Improve settings page and move some config parameters to the database

This commit is contained in:
Frédéric Guillot
2014-10-04 23:31:03 -04:00
parent f531d57dc2
commit 8e5673e3d2
64 changed files with 710 additions and 248 deletions

View File

@@ -5,7 +5,6 @@ namespace Controller;
use Core\Tool;
use Core\Registry;
use Core\Security;
use Core\Translator;
use Model\LastLogin;
/**
@@ -123,12 +122,8 @@ abstract class Base
$this->response->hsts();
}
// Load translations
$language = $this->config->get('language', 'en_US');
if ($language !== 'en_US') Translator::load($language);
// Set timezone
date_default_timezone_set($this->config->get('timezone', 'UTC'));
$this->config->setupTranslations();
$this->config->setupTimezone();
// Authentication
if (! $this->authentication->isAuthenticated($controller, $action)) {