Add single user security mode (#3)
- Tweaks to SQL column definitions - Implement class autoloading - Split user config into its own file
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
<?php
|
||||
// USER CONFIGURATION ITEMS
|
||||
spl_autoload_register(function ($class) {
|
||||
$file = implode(DIRECTORY_SEPARATOR, [ __DIR__, 'lib', "$class.php" ]);
|
||||
if (file_exists($file)) {
|
||||
require $file;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Which security model should the application use?
|
||||
* - 0 = single-user, no password
|
||||
* - 1 = single-user with password
|
||||
* - 2 = multi-user (all users require passwords)
|
||||
*
|
||||
* (NOTE THAT 1 AND 2 HAVE NOT YET BEEN IMPLEMENTED)
|
||||
*/
|
||||
const SECURITY_MODEL = 0;
|
||||
require 'user-config.php';
|
||||
|
||||
/** The name of the database file where users and feeds should be kept */
|
||||
const DATABASE_NAME = 'frc.db';
|
||||
|
||||
// END USER CONFIGURATION ITEMS
|
||||
// (editing below this line is not advised)
|
||||
|
||||
include 'lib/Data.php';
|
||||
Data::ensureDb();
|
||||
|
||||
/**
|
||||
* Render the page title
|
||||
|
||||
Reference in New Issue
Block a user