diff --git a/config/config.example.ini b/config/config.example.ini index 0532ba2..e1be930 100644 --- a/config/config.example.ini +++ b/config/config.example.ini @@ -48,5 +48,8 @@ iso3166 = config/iso3166.json ; Development mode settings [dev] -; Enable development mode -enable = true +; Show detailed error logs in browser +show_errors = true + +; Show a small version of the changelog loaded from sakura.flash.moe +show_changelog = true diff --git a/libraries/DBWrapper/mysql.php b/libraries/DBWrapper/mysql.php index 49fdf6b..6563160 100644 --- a/libraries/DBWrapper/mysql.php +++ b/libraries/DBWrapper/mysql.php @@ -76,8 +76,7 @@ class mysql PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, ]); - } - catch (PDOException $e) { + } catch (PDOException $e) { // Catch connection errors trigger_error('SQL Driver: ' . $e->getMessage(), E_USER_ERROR); } diff --git a/libraries/Main.php b/libraries/Main.php index f9f952f..fb48e22 100644 --- a/libraries/Main.php +++ b/libraries/Main.php @@ -148,7 +148,7 @@ class Main } // Check for dev mode - $detailed = Config::local('dev', 'enable'); + $detailed = Config::local('dev', 'show_errors'); // Build page $errorPage = ' diff --git a/libraries/User.php b/libraries/User.php index 29bfaa6..bd293cf 100644 --- a/libraries/User.php +++ b/libraries/User.php @@ -101,7 +101,6 @@ class User 'password_algo' => $this->data['password_algo'], 'password_iter' => $this->data['password_iter'], 'password_chan' => $this->data['password_chan'], - 'password_new' => $this->data['password_new'], ]; } diff --git a/public/manage.php b/public/manage.php index dd6a536..496eebd 100644 --- a/public/manage.php +++ b/public/manage.php @@ -299,7 +299,7 @@ switch ($category . '.' . $mode) { 'userscount' => Database::count('users')[0], 'bancount' => Database::count('bans')[0], 'uploadcount' => count(glob(ROOT . Config::get('user_uploads') . '/*')) - 1, - ], + ], ]); break; diff --git a/sakura.php b/sakura.php index 86aafed..4d4f1da 100644 --- a/sakura.php +++ b/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20151224'); +define('SAKURA_VERSION', '20151227'); define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_COLOUR', '#6C3082'); @@ -70,7 +70,7 @@ set_error_handler(['Sakura\Main', 'errorHandler']); Config::init(ROOT . 'config/config.ini'); // Change error reporting according to the dev configuration -error_reporting(Config::local('dev', 'enable') ? -1 : 0); +error_reporting(Config::local('dev', 'show_errors') ? -1 : 0); // Make the database connection Database::init(Config::local('database', 'driver')); @@ -127,7 +127,7 @@ if (!defined('SAKURA_NO_TPL')) { ], 'dev' => [ - 'enable' => Config::local('dev', 'enable'), + 'showChangelog' => Config::local('dev', 'show_changelog'), ], 'cookie' => [ diff --git a/templates/yuuno/global/master.tpl b/templates/yuuno/global/master.tpl index b275e82..5618f62 100644 --- a/templates/yuuno/global/master.tpl +++ b/templates/yuuno/global/master.tpl @@ -241,7 +241,7 @@ - {% if sakura.dev.enable and php.self == '/index.php' and stats %} + {% if sakura.dev.showChangelog and php.self == '/index.php' and stats %}