diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php index e32e095..d4bf5ba 100644 --- a/_sakura/components/Users.php +++ b/_sakura/components/Users.php @@ -203,7 +203,7 @@ class Users { return [0, 'INVALID_MX']; // Set a few variables - $usernameClean = Main::cleanString($username); + $usernameClean = Main::cleanString($username, true); $password = Hashing::create_hash($password); $requireActive = Configuration::getConfig('require_activation'); $userRank = $requireActive ? [0] : [1]; diff --git a/_sakura/sakura.php b/_sakura/sakura.php index 503584e..987ba1f 100644 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20150417'); +define('SAKURA_VERSION', '20150420'); // Define Sakura Path define('ROOT', str_replace(basename(__DIR__), '', dirname(__FILE__))); @@ -57,11 +57,17 @@ $renderData = array( 'charset' => Configuration::getConfig('charset'), 'currentpage' => '//'. $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'], 'recaptcha_public' => Configuration::getConfig('recaptcha_public'), - 'resources' => '//'. Configuration::getLocalConfig('urls')['content'] .'/data/'. strtolower(Templates::$_TPL) + 'recaptcha_enable' => Configuration::getConfig('recaptcha'), + 'resources' => '//'. Configuration::getLocalConfig('urls')['content'] .'/data/'. strtolower(Templates::$_TPL), + 'disableregister' => Configuration::getConfig('disable_registration'), + 'requireregcodes' => Configuration::getConfig('require_registration_code'), + 'requireactiveate' => Configuration::getConfig('require_activation'), + 'sitename' => Configuration::getConfig('sitename') ], 'php' => [ 'sessionid' => \session_id(), - 'time' => \time() + 'time' => \time(), + 'self' => $_SERVER['PHP_SELF'] ], 'user' => [ 'checklogin' => Users::checkLogin(), diff --git a/_sakura/templates/yuuno/elements/newsPost.tpl b/_sakura/templates/yuuno/elements/newsPost.tpl index 79e718d..3638170 100644 --- a/_sakura/templates/yuuno/elements/newsPost.tpl +++ b/_sakura/templates/yuuno/elements/newsPost.tpl @@ -12,5 +12,5 @@
- Posted on {{ newsPost.date|date("D Y-m-d H:i:s T") }} View comments + Posted on {{ newsPost.date|date("D Y-m-d H:i:s T") }}{% if page.articleCount > 1 %} View comments{% endif %}
diff --git a/_sakura/templates/yuuno/global/header.tpl b/_sakura/templates/yuuno/global/header.tpl index d60d04d..cfc010f 100644 --- a/_sakura/templates/yuuno/global/header.tpl +++ b/_sakura/templates/yuuno/global/header.tpl @@ -5,25 +5,33 @@ {{ page.title }} - + {% if page.redirect %} {% endif %} - - + + - +
diff --git a/_sakura/templates/yuuno/main/index.tpl b/_sakura/templates/yuuno/main/index.tpl index 1856c73..6dc6067 100644 --- a/_sakura/templates/yuuno/main/index.tpl +++ b/_sakura/templates/yuuno/main/index.tpl @@ -30,7 +30,7 @@
- +