diff options
author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
---|---|---|
committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-04-19 22:12:12 -0400 |
commit | a04ecbde778decfdea7200806a6b1144861ae05f (patch) | |
tree | e4670e3013734d9c7bd201f5d6ef1fbaae13d3b5 /common.php | |
parent | 5aacb6a76351889a6ec5ed01c8e80f139c2b2027 (diff) |
Add RememberMe feature and authentications history
Diffstat (limited to 'common.php')
-rw-r--r-- | common.php | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -6,7 +6,7 @@ require __DIR__.'/core/translator.php'; $registry = new Core\Registry; -$registry->db_version = 11; +$registry->db_version = 12; $registry->db = function() use ($registry) { require __DIR__.'/vendor/PicoDb/Database.php'; @@ -95,6 +95,16 @@ $registry->action = function() use ($registry) { return new \Model\Action($registry->shared('db'), $registry->shared('event')); }; +$registry->rememberMe = function() use ($registry) { + require_once __DIR__.'/models/remember_me.php'; + return new \Model\RememberMe($registry->shared('db'), $registry->shared('event')); +}; + +$registry->lastLogin = function() use ($registry) { + require_once __DIR__.'/models/last_login.php'; + return new \Model\LastLogin($registry->shared('db'), $registry->shared('event')); +}; + if (file_exists('config.php')) require 'config.php'; // Auto-refresh frequency in seconds for the public board view @@ -106,6 +116,9 @@ defined('SESSION_SAVE_PATH') or define('SESSION_SAVE_PATH', ''); // Application version defined('APP_VERSION') or define('APP_VERSION', 'master'); +// Base directory +define('BASE_URL_DIRECTORY', dirname($_SERVER['PHP_SELF'])); + // Database driver: sqlite or mysql defined('DB_DRIVER') or define('DB_DRIVER', 'sqlite'); |