From 023bd805c08e1d49ac26e928ebbc737545babb0c Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 4 Jan 2016 21:14:09 +0100 Subject: [PATCH] r20160104 --- libraries/Main.php | 6 +- libraries/Rank.php | 4 +- libraries/Template.php | 2 +- libraries/User.php | 49 +++++++- libraries/Users.php | 118 ++---------------- public/content/data/yuuno/css/yuuno.css | 2 +- public/profile.php | 14 +-- sakura.php | 3 +- templates/{htmlEmail.tpl => htmlEmail.html} | 0 .../elements/{newsPost.tpl => newsPost.twig} | 0 .../mio/global/{footer.tpl => footer.twig} | 0 .../mio/global/{header.tpl => header.twig} | 0 templates/mio/main/{index.tpl => index.twig} | 6 +- .../elements/{newsPost.tpl => newsPost.twig} | 0 .../{statsHeader.tpl => statsHeader.twig} | 0 .../misaki/forum/{forum.tpl => forum.twig} | 4 +- .../forum/{forumEntry.tpl => forumEntry.twig} | 0 .../misaki/forum/{index.tpl => index.twig} | 6 +- templates/misaki/forum/posting.tpl | 1 - templates/misaki/forum/posting.twig | 1 + .../forum/{topicEntry.tpl => topicEntry.twig} | 0 templates/misaki/forum/viewforum.tpl | 1 - templates/misaki/forum/viewforum.twig | 1 + templates/misaki/forum/viewtopic.tpl | 1 - templates/misaki/forum/viewtopic.twig | 1 + .../{information.tpl => information.twig} | 2 +- .../misaki/global/{master.tpl => master.twig} | 0 .../global/{notfound.tpl => notfound.twig} | 0 .../{restricted.tpl => restricted.twig} | 2 +- templates/misaki/group/index.tpl | 1 - templates/misaki/group/index.twig | 1 + templates/misaki/main/authenticate.tpl | 1 - templates/misaki/main/authenticate.twig | 1 + templates/misaki/main/banned.tpl | 1 - templates/misaki/main/banned.twig | 1 + templates/misaki/main/faq.tpl | 1 - templates/misaki/main/faq.twig | 1 + templates/misaki/main/forgotpassword.tpl | 1 - templates/misaki/main/forgotpassword.twig | 1 + .../misaki/main/{index.tpl => index.twig} | 6 +- .../main/{infopage.tpl => infopage.twig} | 2 +- templates/misaki/main/memberlist.tpl | 1 - templates/misaki/main/memberlist.twig | 1 + templates/misaki/main/news.tpl | 1 - templates/misaki/main/news.twig | 1 + templates/misaki/main/premiumcomplete.tpl | 1 - templates/misaki/main/premiumcomplete.twig | 1 + .../misaki/main/{profile.tpl => profile.twig} | 4 +- templates/misaki/main/report.tpl | 1 - templates/misaki/main/report.twig | 1 + .../misaki/main/{search.tpl => search.twig} | 2 +- .../main/{settings.tpl => settings.twig} | 4 +- templates/misaki/main/support.tpl | 1 - templates/misaki/main/support.twig | 1 + templates/misaki/main/supporttracker.tpl | 1 - templates/misaki/main/supporttracker.twig | 1 + .../profile/{comments.tpl => comments.twig} | 0 .../profile/{friends.tpl => friends.twig} | 0 .../profile/{groups.tpl => groups.twig} | 0 .../profile/{hidden.tpl => hidden.twig} | 0 .../misaki/profile/{index.tpl => index.twig} | 0 .../misaki/profile/{posts.tpl => posts.twig} | 0 .../profile/{threads.tpl => threads.twig} | 0 .../{general.home.tpl => general.home.twig} | 0 ...neral.options.tpl => general.options.twig} | 0 .../elements/{captcha.tpl => captcha.twig} | 0 .../elements/{comment.tpl => comment.twig} | 2 +- .../elements/{comments.tpl => comments.twig} | 2 +- .../elements/{editor.tpl => editor.twig} | 0 .../{indexPanel.tpl => indexPanel.twig} | 0 .../elements/{newsPost.tpl => newsPost.twig} | 0 .../{pagination.tpl => pagination.twig} | 0 .../{settingsNav.tpl => settingsNav.twig} | 0 .../yuuno/forum/{forum.tpl => forum.twig} | 10 +- .../forum/{forumBtns.tpl => forumBtns.twig} | 2 +- .../forum/{forumEntry.tpl => forumEntry.twig} | 0 .../yuuno/forum/{index.tpl => index.twig} | 8 +- .../yuuno/forum/{posting.tpl => posting.twig} | 4 +- .../forum/{topicEntry.tpl => topicEntry.twig} | 0 .../forum/{viewforum.tpl => viewforum.twig} | 4 +- .../forum/{viewtopic.tpl => viewtopic.twig} | 6 +- .../global/{confirm.tpl => confirm.twig} | 2 +- .../{information.tpl => information.twig} | 2 +- .../yuuno/global/{master.tpl => master.twig} | 0 .../global/{notfound.tpl => notfound.twig} | 0 .../{restricted.tpl => restricted.twig} | 2 +- templates/yuuno/group/index.tpl | 1 - templates/yuuno/group/index.twig | 1 + .../{authenticate.tpl => authenticate.twig} | 4 +- .../yuuno/main/{banned.tpl => banned.twig} | 2 +- templates/yuuno/main/{faq.tpl => faq.twig} | 2 +- ...forgotpassword.tpl => forgotpassword.twig} | 2 +- .../yuuno/main/{index.tpl => index.twig} | 6 +- .../main/{infopage.tpl => infopage.twig} | 2 +- .../main/{memberlist.tpl => memberlist.twig} | 4 +- templates/yuuno/main/{news.tpl => news.twig} | 8 +- ...emiumcomplete.tpl => premiumcomplete.twig} | 2 +- .../yuuno/main/{profile.tpl => profile.twig} | 4 +- templates/yuuno/main/report.tpl | 1 - templates/yuuno/main/report.twig | 1 + .../yuuno/main/{search.tpl => search.twig} | 2 +- .../main/{settings.tpl => settings.twig} | 6 +- .../yuuno/main/{support.tpl => support.twig} | 2 +- ...supporttracker.tpl => supporttracker.twig} | 4 +- ...mments.manage.tpl => comments.manage.twig} | 0 ...config.general.tpl => config.general.twig} | 0 .../{config.mail.tpl => config.mail.twig} | 0 ...config.premium.tpl => config.premium.twig} | 0 ...config.uploads.tpl => config.uploads.twig} | 0 .../{config.user.tpl => config.user.twig} | 0 .../{forums.manage.tpl => forums.manage.twig} | 0 ...rums.settings.tpl => forums.settings.twig} | 0 ...l.dashboard.tpl => general.dashboard.twig} | 0 .../{general.info.tpl => general.info.twig} | 0 .../{logs.actions.tpl => logs.actions.twig} | 0 .../{logs.errors.tpl => logs.errors.twig} | 0 ...gs.management.tpl => logs.management.twig} | 0 ...sions.forum.tpl => permissions.forum.twig} | 0 ...gement.tpl => permissions.management.twig} | 0 ...issions.site.tpl => permissions.site.twig} | 0 .../{users.bans.tpl => users.bans.twig} | 0 ...nage-ranks.tpl => users.manage-ranks.twig} | 0 ...nage-users.tpl => users.manage-users.twig} | 0 ...on-fields.tpl => users.option-fields.twig} | 0 ...e-fields.tpl => users.profile-fields.twig} | 0 ...users.warnings.tpl => users.warnings.twig} | 0 .../profile/{comments.tpl => comments.twig} | 2 +- .../profile/{friends.tpl => friends.twig} | 0 .../yuuno/profile/{groups.tpl => groups.twig} | 0 .../yuuno/profile/{index.tpl => index.twig} | 0 .../yuuno/profile/{posts.tpl => posts.twig} | 0 .../profile/{threads.tpl => threads.twig} | 0 .../{account.email.tpl => account.email.twig} | 0 ...unt.password.tpl => account.password.twig} | 0 .../{account.ranks.tpl => account.ranks.twig} | 0 ...unt.username.tpl => account.username.twig} | 0 ...t.usertitle.tpl => account.usertitle.twig} | 0 ...eactivate.tpl => advanced.deactivate.twig} | 2 +- ...ed.sessions.tpl => advanced.sessions.twig} | 0 ...ance.avatar.tpl => appearance.avatar.twig} | 0 ...kground.tpl => appearance.background.twig} | 0 ...ignature.tpl => appearance.signature.twig} | 0 ....userpage.tpl => appearance.userpage.twig} | 0 ...iends.listing.tpl => friends.listing.twig} | 2 +- ...nds.requests.tpl => friends.requests.twig} | 2 +- .../{general.home.tpl => general.home.twig} | 0 ...neral.options.tpl => general.options.twig} | 0 ...neral.profile.tpl => general.profile.twig} | 0 ...ages.compose.tpl => messages.compose.twig} | 0 ...messages.inbox.tpl => messages.inbox.twig} | 0 .../{messages.read.tpl => messages.read.twig} | 0 .../{messages.sent.tpl => messages.sent.twig} | 0 ...history.tpl => notifications.history.twig} | 4 +- 153 files changed, 154 insertions(+), 220 deletions(-) rename templates/{htmlEmail.tpl => htmlEmail.html} (100%) rename templates/mio/elements/{newsPost.tpl => newsPost.twig} (100%) rename templates/mio/global/{footer.tpl => footer.twig} (100%) rename templates/mio/global/{header.tpl => header.twig} (100%) rename templates/mio/main/{index.tpl => index.twig} (93%) rename templates/misaki/elements/{newsPost.tpl => newsPost.twig} (100%) rename templates/misaki/elements/{statsHeader.tpl => statsHeader.twig} (100%) rename templates/misaki/forum/{forum.tpl => forum.twig} (86%) rename templates/misaki/forum/{forumEntry.tpl => forumEntry.twig} (100%) rename templates/misaki/forum/{index.tpl => index.twig} (50%) delete mode 100644 templates/misaki/forum/posting.tpl create mode 100644 templates/misaki/forum/posting.twig rename templates/misaki/forum/{topicEntry.tpl => topicEntry.twig} (100%) delete mode 100644 templates/misaki/forum/viewforum.tpl create mode 100644 templates/misaki/forum/viewforum.twig delete mode 100644 templates/misaki/forum/viewtopic.tpl create mode 100644 templates/misaki/forum/viewtopic.twig rename templates/misaki/global/{information.tpl => information.twig} (90%) rename templates/misaki/global/{master.tpl => master.twig} (100%) rename templates/misaki/global/{notfound.tpl => notfound.twig} (100%) rename templates/misaki/global/{restricted.tpl => restricted.twig} (90%) delete mode 100644 templates/misaki/group/index.tpl create mode 100644 templates/misaki/group/index.twig delete mode 100644 templates/misaki/main/authenticate.tpl create mode 100644 templates/misaki/main/authenticate.twig delete mode 100644 templates/misaki/main/banned.tpl create mode 100644 templates/misaki/main/banned.twig delete mode 100644 templates/misaki/main/faq.tpl create mode 100644 templates/misaki/main/faq.twig delete mode 100644 templates/misaki/main/forgotpassword.tpl create mode 100644 templates/misaki/main/forgotpassword.twig rename templates/misaki/main/{index.tpl => index.twig} (83%) rename templates/misaki/main/{infopage.tpl => infopage.twig} (87%) delete mode 100644 templates/misaki/main/memberlist.tpl create mode 100644 templates/misaki/main/memberlist.twig delete mode 100644 templates/misaki/main/news.tpl create mode 100644 templates/misaki/main/news.twig delete mode 100644 templates/misaki/main/premiumcomplete.tpl create mode 100644 templates/misaki/main/premiumcomplete.twig rename templates/misaki/main/{profile.tpl => profile.twig} (99%) delete mode 100644 templates/misaki/main/report.tpl create mode 100644 templates/misaki/main/report.twig rename templates/misaki/main/{search.tpl => search.twig} (95%) rename templates/misaki/main/{settings.tpl => settings.twig} (83%) delete mode 100644 templates/misaki/main/support.tpl create mode 100644 templates/misaki/main/support.twig delete mode 100644 templates/misaki/main/supporttracker.tpl create mode 100644 templates/misaki/main/supporttracker.twig rename templates/misaki/profile/{comments.tpl => comments.twig} (100%) rename templates/misaki/profile/{friends.tpl => friends.twig} (100%) rename templates/misaki/profile/{groups.tpl => groups.twig} (100%) rename templates/misaki/profile/{hidden.tpl => hidden.twig} (100%) rename templates/misaki/profile/{index.tpl => index.twig} (100%) rename templates/misaki/profile/{posts.tpl => posts.twig} (100%) rename templates/misaki/profile/{threads.tpl => threads.twig} (100%) rename templates/misaki/settings/{general.home.tpl => general.home.twig} (100%) rename templates/misaki/settings/{general.options.tpl => general.options.twig} (100%) rename templates/yuuno/elements/{captcha.tpl => captcha.twig} (100%) rename templates/yuuno/elements/{comment.tpl => comment.twig} (97%) rename templates/yuuno/elements/{comments.tpl => comments.twig} (97%) rename templates/yuuno/elements/{editor.tpl => editor.twig} (100%) rename templates/yuuno/elements/{indexPanel.tpl => indexPanel.twig} (100%) rename templates/yuuno/elements/{newsPost.tpl => newsPost.twig} (100%) rename templates/yuuno/elements/{pagination.tpl => pagination.twig} (100%) rename templates/yuuno/elements/{settingsNav.tpl => settingsNav.twig} (100%) rename templates/yuuno/forum/{forum.tpl => forum.twig} (87%) rename templates/yuuno/forum/{forumBtns.tpl => forumBtns.twig} (95%) rename templates/yuuno/forum/{forumEntry.tpl => forumEntry.twig} (100%) rename templates/yuuno/forum/{index.tpl => index.twig} (74%) rename templates/yuuno/forum/{posting.tpl => posting.twig} (89%) rename templates/yuuno/forum/{topicEntry.tpl => topicEntry.twig} (100%) rename templates/yuuno/forum/{viewforum.tpl => viewforum.twig} (86%) rename templates/yuuno/forum/{viewtopic.tpl => viewtopic.twig} (97%) rename templates/yuuno/global/{confirm.tpl => confirm.twig} (96%) rename templates/yuuno/global/{information.tpl => information.twig} (91%) rename templates/yuuno/global/{master.tpl => master.twig} (100%) rename templates/yuuno/global/{notfound.tpl => notfound.twig} (100%) rename templates/yuuno/global/{restricted.tpl => restricted.twig} (91%) delete mode 100644 templates/yuuno/group/index.tpl create mode 100644 templates/yuuno/group/index.twig rename templates/yuuno/main/{authenticate.tpl => authenticate.twig} (99%) rename templates/yuuno/main/{banned.tpl => banned.twig} (97%) rename templates/yuuno/main/{faq.tpl => faq.twig} (96%) rename templates/yuuno/main/{forgotpassword.tpl => forgotpassword.twig} (98%) rename templates/yuuno/main/{index.tpl => index.twig} (77%) rename templates/yuuno/main/{infopage.tpl => infopage.twig} (87%) rename templates/yuuno/main/{memberlist.tpl => memberlist.twig} (98%) rename templates/yuuno/main/{news.tpl => news.twig} (89%) rename templates/yuuno/main/{premiumcomplete.tpl => premiumcomplete.twig} (92%) rename templates/yuuno/main/{profile.tpl => profile.twig} (99%) delete mode 100644 templates/yuuno/main/report.tpl create mode 100644 templates/yuuno/main/report.twig rename templates/yuuno/main/{search.tpl => search.twig} (96%) rename templates/yuuno/main/{settings.tpl => settings.twig} (81%) rename templates/yuuno/main/{support.tpl => support.twig} (99%) rename templates/yuuno/main/{supporttracker.tpl => supporttracker.twig} (96%) rename templates/yuuno/manage/{comments.manage.tpl => comments.manage.twig} (100%) rename templates/yuuno/manage/{config.general.tpl => config.general.twig} (100%) rename templates/yuuno/manage/{config.mail.tpl => config.mail.twig} (100%) rename templates/yuuno/manage/{config.premium.tpl => config.premium.twig} (100%) rename templates/yuuno/manage/{config.uploads.tpl => config.uploads.twig} (100%) rename templates/yuuno/manage/{config.user.tpl => config.user.twig} (100%) rename templates/yuuno/manage/{forums.manage.tpl => forums.manage.twig} (100%) rename templates/yuuno/manage/{forums.settings.tpl => forums.settings.twig} (100%) rename templates/yuuno/manage/{general.dashboard.tpl => general.dashboard.twig} (100%) rename templates/yuuno/manage/{general.info.tpl => general.info.twig} (100%) rename templates/yuuno/manage/{logs.actions.tpl => logs.actions.twig} (100%) rename templates/yuuno/manage/{logs.errors.tpl => logs.errors.twig} (100%) rename templates/yuuno/manage/{logs.management.tpl => logs.management.twig} (100%) rename templates/yuuno/manage/{permissions.forum.tpl => permissions.forum.twig} (100%) rename templates/yuuno/manage/{permissions.management.tpl => permissions.management.twig} (100%) rename templates/yuuno/manage/{permissions.site.tpl => permissions.site.twig} (100%) rename templates/yuuno/manage/{users.bans.tpl => users.bans.twig} (100%) rename templates/yuuno/manage/{users.manage-ranks.tpl => users.manage-ranks.twig} (100%) rename templates/yuuno/manage/{users.manage-users.tpl => users.manage-users.twig} (100%) rename templates/yuuno/manage/{users.option-fields.tpl => users.option-fields.twig} (100%) rename templates/yuuno/manage/{users.profile-fields.tpl => users.profile-fields.twig} (100%) rename templates/yuuno/manage/{users.warnings.tpl => users.warnings.twig} (100%) rename templates/yuuno/profile/{comments.tpl => comments.twig} (73%) rename templates/yuuno/profile/{friends.tpl => friends.twig} (100%) rename templates/yuuno/profile/{groups.tpl => groups.twig} (100%) rename templates/yuuno/profile/{index.tpl => index.twig} (100%) rename templates/yuuno/profile/{posts.tpl => posts.twig} (100%) rename templates/yuuno/profile/{threads.tpl => threads.twig} (100%) rename templates/yuuno/settings/{account.email.tpl => account.email.twig} (100%) rename templates/yuuno/settings/{account.password.tpl => account.password.twig} (100%) rename templates/yuuno/settings/{account.ranks.tpl => account.ranks.twig} (100%) rename templates/yuuno/settings/{account.username.tpl => account.username.twig} (100%) rename templates/yuuno/settings/{account.usertitle.tpl => account.usertitle.twig} (100%) rename templates/yuuno/settings/{advanced.deactivate.tpl => advanced.deactivate.twig} (98%) rename templates/yuuno/settings/{advanced.sessions.tpl => advanced.sessions.twig} (100%) rename templates/yuuno/settings/{appearance.avatar.tpl => appearance.avatar.twig} (100%) rename templates/yuuno/settings/{appearance.background.tpl => appearance.background.twig} (100%) rename templates/yuuno/settings/{appearance.signature.tpl => appearance.signature.twig} (100%) rename templates/yuuno/settings/{appearance.userpage.tpl => appearance.userpage.twig} (100%) rename templates/yuuno/settings/{friends.listing.tpl => friends.listing.twig} (97%) rename templates/yuuno/settings/{friends.requests.tpl => friends.requests.twig} (97%) rename templates/yuuno/settings/{general.home.tpl => general.home.twig} (100%) rename templates/yuuno/settings/{general.options.tpl => general.options.twig} (100%) rename templates/yuuno/settings/{general.profile.tpl => general.profile.twig} (100%) rename templates/yuuno/settings/{messages.compose.tpl => messages.compose.twig} (100%) rename templates/yuuno/settings/{messages.inbox.tpl => messages.inbox.twig} (100%) rename templates/yuuno/settings/{messages.read.tpl => messages.read.twig} (100%) rename templates/yuuno/settings/{messages.sent.tpl => messages.sent.twig} (100%) rename templates/yuuno/settings/{notifications.history.tpl => notifications.history.twig} (87%) diff --git a/libraries/Main.php b/libraries/Main.php index e20b7a5..7617872 100644 --- a/libraries/Main.php +++ b/libraries/Main.php @@ -274,7 +274,7 @@ class Main $mail->isHTML(true); // Set email contents - $htmlMail = file_get_contents(ROOT . 'templates/htmlEmail.tpl'); + $htmlMail = file_get_contents(ROOT . 'templates/htmlEmail.html'); // Replace template tags $htmlMail = str_replace('{{ sitename }}', Config::get('sitename'), $htmlMail); @@ -303,7 +303,7 @@ class Main } // Cleaning strings - public static function cleanString($string, $lower = false, $noSpecial = false) + public static function cleanString($string, $lower = false, $noSpecial = false, $replaceSpecial = '') { // Run common sanitisation function over string @@ -318,7 +318,7 @@ class Main // If set remove all characters that aren't a-z or 0-9 if ($noSpecial) { - $string = preg_replace('/[^a-z0-9]/', '', $string); + $string = preg_replace('/[^a-z0-9]/', $replaceSpecial, $string); } // Return clean string diff --git a/libraries/Rank.php b/libraries/Rank.php index 03c5ad1..6fc8583 100644 --- a/libraries/Rank.php +++ b/libraries/Rank.php @@ -19,9 +19,9 @@ class Rank 'rank_id' => 0, 'rank_name' => 'Rank', 'rank_hierarchy' => 0, - 'rank_multiple' => null, + 'rank_multiple' => '', 'rank_hidden' => 1, - 'rank_colour' => '#444', + 'rank_colour' => 'inherit', 'rank_description' => '', 'rank_title' => '', ]; diff --git a/libraries/Template.php b/libraries/Template.php index 45a13fc..5ed0500 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -20,7 +20,7 @@ class Template private $template; private $templateName; private $templateOptions; - protected $templateFileExtension = ".tpl"; + protected $templateFileExtension = ".twig"; // Initialise templating engine and data public function __construct() diff --git a/libraries/User.php b/libraries/User.php index 5dba9d4..0d17236 100644 --- a/libraries/User.php +++ b/libraries/User.php @@ -54,6 +54,48 @@ class User return self::$_userCache[$uid]; } + // Creating a new user + public static function create($username, $password, $email, $ranks = [2]) + { + // Set a few variables + $usernameClean = Main::cleanString($username, true); + $emailClean = Main::cleanString($email, true); + $password = Hashing::createHash($password); + + // Insert the user into the database + Database::insert('users', [ + 'username' => $username, + 'username_clean' => $usernameClean, + 'password_hash' => $password[3], + 'password_salt' => $password[2], + 'password_algo' => $password[0], + 'password_iter' => $password[1], + 'email' => $emailClean, + 'rank_main' => 0, + 'register_ip' => Main::getRemoteIP(), + 'last_ip' => Main::getRemoteIP(), + 'user_registered' => time(), + 'user_last_online' => 0, + 'user_country' => Main::getCountryCode(), + 'user_data' => '[]', + ]); + + // Get the last id + $userId = Database::lastInsertID(); + + // Create a user object + $user = self::construct($userId); + + // Assign the default rank + $user->addRanks($ranks); + + // Set the default rank + $user->setMainRank($ranks[0]); + + // Return the user object + return $user; + } + // Initialise the user object private function __construct($uid) { @@ -90,7 +132,7 @@ class User // Check if ranks were set if (empty($this->ranks)) { // If not assign the fallback rank - $this->ranks[0] = Rank::construct(0); + $this->ranks[1] = Rank::construct(1); } // Assign the user's main rank to a special variable since we'll use it a lot @@ -271,11 +313,6 @@ class User // Set the main rank of this user public function setMainRank($rank) { - // Only allow this if this rank is actually present in their set of ranks - if (!in_array($rank, $this->ranks())) { - return false; - } - // If it does exist update their row Database::update('users', [ [ diff --git a/libraries/Users.php b/libraries/Users.php index 4820f39..f3b7d73 100644 --- a/libraries/Users.php +++ b/libraries/Users.php @@ -221,14 +221,6 @@ class Users return [0, 'DISABLED']; } - // Check if registration codes are required - if (Config::get('require_registration_code')) { - // Check if the code is valid - if (!self::checkRegistrationCode($regkey)) { - return [0, 'INVALID_REG_KEY']; - } - } - // Check if the user agreed to the ToS if (!$tos) { return [0, 'TOS']; @@ -277,45 +269,16 @@ class Users } // Set a few variables - $usernameClean = Main::cleanString($username, true); - $emailClean = Main::cleanString($email, true); - $password = Hashing::createHash($password); $requireActive = Config::get('require_activation'); - $userRank = $requireActive ? [1] : [2]; - $userRankJson = json_encode($userRank); + $ranks = $requireActive ? [1] : [2]; - // Insert the user into the database - Database::insert('users', [ - 'username' => $username, - 'username_clean' => $usernameClean, - 'password_hash' => $password[3], - 'password_salt' => $password[2], - 'password_algo' => $password[0], - 'password_iter' => $password[1], - 'email' => $emailClean, - 'rank_main' => $userRank[0], - 'user_ranks' => $userRankJson, - 'register_ip' => Main::getRemoteIP(), - 'last_ip' => Main::getRemoteIP(), - 'user_registered' => time(), - 'user_last_online' => 0, - 'user_country' => Main::getCountryCode(), - 'user_data' => '[]', - ]); - - // Get userid of the new user - $uid = Database::fetch('users', false, ['username_clean' => [$usernameClean, '=']])['user_id']; + // Create the user + $user = User::create($username, $password, $email, $ranks); // Check if we require e-mail activation if ($requireActive) { // Send activation e-mail to user - self::sendActivationMail($uid); - } - - // Check if registration codes are required - if (Config::get('require_registration_code')) { - // If we do mark the registration code that was used as used - self::markRegistrationCodeUsed($regkey, $uid); + self::sendActivationMail($user->id()); } // Return true with a specific message if needed @@ -493,11 +456,11 @@ class Users $message = "Welcome to " . Config::get('sitename') . "!\r\n\r\n"; $message .= "Please keep this e-mail for your records. Your account intormation is as follows:\r\n\r\n"; $message .= "----------------------------\r\n\r\n"; - $message .= "Username: " . $user['username'] . "\r\n\r\n"; - $message .= "Your profile: http://" . Config::get('url_main') . $urls->format('USER_PROFILE', [$user['user_id']]) . "\r\n\r\n"; + $message .= "Username: " . $user->username() . "\r\n\r\n"; + $message .= "Your profile: http://" . Config::get('url_main') . $urls->format('USER_PROFILE', [$user->id()]) . "\r\n\r\n"; $message .= "----------------------------\r\n\r\n"; $message .= "Please visit the following link in order to activate your account:\r\n\r\n"; - $message .= "http://" . Config::get('url_main') . $urls->format('SITE_ACTIVATE') . "?mode=activate&u=" . $user['user_id'] . "&k=" . $activate . "\r\n\r\n"; + $message .= "http://" . Config::get('url_main') . $urls->format('SITE_ACTIVATE') . "?mode=activate&u=" . $user->id() . "&k=" . $activate . "\r\n\r\n"; $message .= "Your password has been securely stored in our database and cannot be retrieved. "; $message .= "In the event that it is forgotten, you will be able to reset it using the email address associated with your account.\r\n\r\n"; $message .= "Thank you for registering.\r\n\r\n"; @@ -506,7 +469,7 @@ class Users // Send the message Main::sendMail( [ - $user['email'] => $user['username'], + $user->email() => $user->username(), ], Config::get('sitename') . ' Activation Mail', $message @@ -568,71 +531,6 @@ class Users return [1, 'SUCCESS']; } - // Check if registration code is valid - public static function checkRegistrationCode($code) - { - // Get registration key - $keyRow = Database::fetch('regcodes', true, ['code' => [$code, '='], 'key_used' => [0, '=']]); - - // Check if it exists and return it - return count($keyRow) ? $keyRow[0]['id'] : false; - } - - // Mark registration code as used - public static function markRegistrationCodeUsed($code, $uid = 0) - { - // Check if the code exists - if (!$id = self::checkRegistrationCode($code)) { - return false; - } - - // Mark it as used - Database::update('regcodes', [ - [ - 'used_by' => $uid, - 'key_used' => 1, - ], - [ - 'id' => [$id, '='], - ], - ]); - - // Return true because yeah - return true; - } - - // Create new registration code - public static function createRegistrationCode($userId) - { - // Check if we're logged in - if (!self::checkLogin()) { - return false; - } - - // Check if the user is not exceeding the maximum registration key amount - if (Database::count( - 'regcodes', - true, - ['uid' => [$userId, '=']] - )[0] >= Config::get('max_reg_keys')) { - return false; - } - - // Generate a code by MD5'ing some random bullshit - $code = md5('SAKURA' . rand(0, 99999999) . $userId . 'NOOKLSISGOD'); - - // Insert the key into the database - Database::insert('regcodes', [ - 'code' => $code, - 'created_by' => $userId, - 'used_by' => 0, - 'key_used' => 0, - ]); - - // Return the code - return $code; - } - // Check if a user exists public static function userExists($user, $id = true) { diff --git a/public/content/data/yuuno/css/yuuno.css b/public/content/data/yuuno/css/yuuno.css index 5989d6d..cdc3d38 100644 --- a/public/content/data/yuuno/css/yuuno.css +++ b/public/content/data/yuuno/css/yuuno.css @@ -644,7 +644,7 @@ a.default:active { display: block; margin: 10px auto; text-align: center; - padding: 2px; + padding: 2px 3px; border: 1px solid #9475B2; box-shadow: 0 0 3px #9475B2; border-radius: 3px; diff --git a/public/profile.php b/public/profile.php index bd5a97c..f75bc2c 100644 --- a/public/profile.php +++ b/public/profile.php @@ -43,14 +43,14 @@ if ($profile->id() == 0) { 'message' => 'The user this profile belongs to changed their username, you are being redirected.', 'redirect' => $urls->format('USER_PROFILE', [$check['user_id']]), ]; + + // Set parse variables + $template->setVariables($renderData); + + // Print page contents + echo $template->render('global/information'); + exit; } - - // Set parse variables - $template->setVariables($renderData); - - // Print page contents - echo $template->render('global/information'); - exit; } // Set parse variables diff --git a/sakura.php b/sakura.php index 8865258..0d4a3ea 100644 --- a/sakura.php +++ b/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20160103'); +define('SAKURA_VERSION', '20160104'); define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_COLOUR', '#6C3082'); @@ -159,7 +159,6 @@ if (!defined('SAKURA_NO_TPL')) { 'disableRegistration' => Config::get('disable_registration'), 'lockAuth' => Config::get('lock_authentication'), - 'requireRegCodes' => Config::get('require_registration_code'), 'requireActivation' => Config::get('require_activation'), 'minPwdEntropy' => Config::get('min_entropy'), 'minUsernameLength' => Config::get('username_min_length'), diff --git a/templates/htmlEmail.tpl b/templates/htmlEmail.html similarity index 100% rename from templates/htmlEmail.tpl rename to templates/htmlEmail.html diff --git a/templates/mio/elements/newsPost.tpl b/templates/mio/elements/newsPost.twig similarity index 100% rename from templates/mio/elements/newsPost.tpl rename to templates/mio/elements/newsPost.twig diff --git a/templates/mio/global/footer.tpl b/templates/mio/global/footer.twig similarity index 100% rename from templates/mio/global/footer.tpl rename to templates/mio/global/footer.twig diff --git a/templates/mio/global/header.tpl b/templates/mio/global/header.twig similarity index 100% rename from templates/mio/global/header.tpl rename to templates/mio/global/header.twig diff --git a/templates/mio/main/index.tpl b/templates/mio/main/index.twig similarity index 93% rename from templates/mio/main/index.tpl rename to templates/mio/main/index.twig index 8c1ebb2..3b16b7b 100644 --- a/templates/mio/main/index.tpl +++ b/templates/mio/main/index.twig @@ -1,4 +1,4 @@ -{% include 'global/header.tpl' %} +{% include 'global/header.twig' %}

Welcome!


@@ -12,7 +12,7 @@

Latest News Posts_

{% for post in news.getPosts(0, newsCount) %} - {% include 'elements/newsPost.tpl' %} + {% include 'elements/newsPost.twig' %} {% endfor %}
@@ -33,4 +33,4 @@ -{% include 'global/footer.tpl' %} +{% include 'global/footer.twig' %} diff --git a/templates/misaki/elements/newsPost.tpl b/templates/misaki/elements/newsPost.twig similarity index 100% rename from templates/misaki/elements/newsPost.tpl rename to templates/misaki/elements/newsPost.twig diff --git a/templates/misaki/elements/statsHeader.tpl b/templates/misaki/elements/statsHeader.twig similarity index 100% rename from templates/misaki/elements/statsHeader.tpl rename to templates/misaki/elements/statsHeader.twig diff --git a/templates/misaki/forum/forum.tpl b/templates/misaki/forum/forum.twig similarity index 86% rename from templates/misaki/forum/forum.tpl rename to templates/misaki/forum/forum.twig index 3e6f421..d7f6772 100644 --- a/templates/misaki/forum/forum.tpl +++ b/templates/misaki/forum/forum.twig @@ -8,12 +8,12 @@
{{ forum.description }}
{% for forum in forum.forums %} - {% include 'forum/forumEntry.tpl' %} + {% include 'forum/forumEntry.twig' %} {% endfor %} {% endif %} {% else %} - {% include 'forum/forumEntry.tpl' %} + {% include 'forum/forumEntry.twig' %} {% endif %} {% endfor %} diff --git a/templates/misaki/forum/forumEntry.tpl b/templates/misaki/forum/forumEntry.twig similarity index 100% rename from templates/misaki/forum/forumEntry.tpl rename to templates/misaki/forum/forumEntry.twig diff --git a/templates/misaki/forum/index.tpl b/templates/misaki/forum/index.twig similarity index 50% rename from templates/misaki/forum/index.tpl rename to templates/misaki/forum/index.twig index ed2bad3..7d33466 100644 --- a/templates/misaki/forum/index.tpl +++ b/templates/misaki/forum/index.twig @@ -1,10 +1,10 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}Forum Listing{% endblock %} {% block content %}
- {% include 'elements/statsHeader.tpl' %} - {% include 'forum/forum.tpl' %} + {% include 'elements/statsHeader.twig' %} + {% include 'forum/forum.twig' %}
{% endblock %} diff --git a/templates/misaki/forum/posting.tpl b/templates/misaki/forum/posting.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/forum/posting.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/forum/posting.twig b/templates/misaki/forum/posting.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/forum/posting.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/forum/topicEntry.tpl b/templates/misaki/forum/topicEntry.twig similarity index 100% rename from templates/misaki/forum/topicEntry.tpl rename to templates/misaki/forum/topicEntry.twig diff --git a/templates/misaki/forum/viewforum.tpl b/templates/misaki/forum/viewforum.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/forum/viewforum.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/forum/viewforum.twig b/templates/misaki/forum/viewforum.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/forum/viewforum.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/forum/viewtopic.tpl b/templates/misaki/forum/viewtopic.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/forum/viewtopic.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/forum/viewtopic.twig b/templates/misaki/forum/viewtopic.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/forum/viewtopic.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/global/information.tpl b/templates/misaki/global/information.twig similarity index 90% rename from templates/misaki/global/information.tpl rename to templates/misaki/global/information.twig index 96b93ef..4c99e56 100644 --- a/templates/misaki/global/information.tpl +++ b/templates/misaki/global/information.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}Information{% endblock %} diff --git a/templates/misaki/global/master.tpl b/templates/misaki/global/master.twig similarity index 100% rename from templates/misaki/global/master.tpl rename to templates/misaki/global/master.twig diff --git a/templates/misaki/global/notfound.tpl b/templates/misaki/global/notfound.twig similarity index 100% rename from templates/misaki/global/notfound.tpl rename to templates/misaki/global/notfound.twig diff --git a/templates/misaki/global/restricted.tpl b/templates/misaki/global/restricted.twig similarity index 90% rename from templates/misaki/global/restricted.tpl rename to templates/misaki/global/restricted.twig index 5b63fa2..c76dbc9 100644 --- a/templates/misaki/global/restricted.tpl +++ b/templates/misaki/global/restricted.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}Restricted{% endblock %} diff --git a/templates/misaki/group/index.tpl b/templates/misaki/group/index.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/group/index.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/group/index.twig b/templates/misaki/group/index.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/group/index.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/authenticate.tpl b/templates/misaki/main/authenticate.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/authenticate.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/authenticate.twig b/templates/misaki/main/authenticate.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/authenticate.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/banned.tpl b/templates/misaki/main/banned.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/banned.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/banned.twig b/templates/misaki/main/banned.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/banned.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/faq.tpl b/templates/misaki/main/faq.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/faq.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/faq.twig b/templates/misaki/main/faq.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/faq.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/forgotpassword.tpl b/templates/misaki/main/forgotpassword.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/forgotpassword.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/forgotpassword.twig b/templates/misaki/main/forgotpassword.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/forgotpassword.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/index.tpl b/templates/misaki/main/index.twig similarity index 83% rename from templates/misaki/main/index.tpl rename to templates/misaki/main/index.twig index c485a8b..1a47807 100644 --- a/templates/misaki/main/index.tpl +++ b/templates/misaki/main/index.twig @@ -1,8 +1,8 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block content %}
- {% include 'elements/statsHeader.tpl' %} + {% include 'elements/statsHeader.twig' %}
{% if stats.onlineUsers %} {% for amount,onlineUser in stats.onlineUsers %} @@ -14,7 +14,7 @@
{% for post in news.getPosts(0, newsCount) %} - {% include 'elements/newsPost.tpl' %} + {% include 'elements/newsPost.twig' %} {% endfor %}
diff --git a/templates/misaki/main/infopage.tpl b/templates/misaki/main/infopage.twig similarity index 87% rename from templates/misaki/main/infopage.tpl rename to templates/misaki/main/infopage.twig index 2645c56..ba9bbc1 100644 --- a/templates/misaki/main/infopage.tpl +++ b/templates/misaki/main/infopage.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}{% if page.title %}{{ page.title }}{% else %}Not found!{% endif %}{% endblock %} diff --git a/templates/misaki/main/memberlist.tpl b/templates/misaki/main/memberlist.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/memberlist.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/memberlist.twig b/templates/misaki/main/memberlist.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/memberlist.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/news.tpl b/templates/misaki/main/news.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/news.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/news.twig b/templates/misaki/main/news.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/news.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/premiumcomplete.tpl b/templates/misaki/main/premiumcomplete.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/premiumcomplete.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/premiumcomplete.twig b/templates/misaki/main/premiumcomplete.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/premiumcomplete.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/profile.tpl b/templates/misaki/main/profile.twig similarity index 99% rename from templates/misaki/main/profile.tpl rename to templates/misaki/main/profile.twig index 0e42426..c2a4fb2 100644 --- a/templates/misaki/main/profile.tpl +++ b/templates/misaki/main/profile.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% set profileHidden = profile.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or (profile.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) and (user.id != profile.id and not user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')))) %} @@ -217,7 +217,7 @@ {% endif %}
- {% include 'profile/' ~ profileView ~ '.tpl' %} + {% include 'profile/' ~ profileView ~ '.twig' %}
diff --git a/templates/misaki/main/report.tpl b/templates/misaki/main/report.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/report.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/report.twig b/templates/misaki/main/report.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/report.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/search.tpl b/templates/misaki/main/search.twig similarity index 95% rename from templates/misaki/main/search.tpl rename to templates/misaki/main/search.twig index 7f7bc21..0ac16a5 100644 --- a/templates/misaki/main/search.tpl +++ b/templates/misaki/main/search.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}Search{% endblock %} diff --git a/templates/misaki/main/settings.tpl b/templates/misaki/main/settings.twig similarity index 83% rename from templates/misaki/main/settings.tpl rename to templates/misaki/main/settings.twig index 1922fbb..fa5e170 100644 --- a/templates/misaki/main/settings.tpl +++ b/templates/misaki/main/settings.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% block title %}{{ page.category }} / {{ page.mode }}{% endblock %} @@ -13,5 +13,5 @@ {% endfor %} - {% include 'settings/' ~ current ~ '.tpl' %} + {% include 'settings/' ~ current ~ '.twig' %} {% endblock %} diff --git a/templates/misaki/main/support.tpl b/templates/misaki/main/support.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/support.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/support.twig b/templates/misaki/main/support.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/support.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/main/supporttracker.tpl b/templates/misaki/main/supporttracker.tpl deleted file mode 100644 index 384a88a..0000000 --- a/templates/misaki/main/supporttracker.tpl +++ /dev/null @@ -1 +0,0 @@ -{% extends 'global/master.tpl' %} diff --git a/templates/misaki/main/supporttracker.twig b/templates/misaki/main/supporttracker.twig new file mode 100644 index 0000000..38b9115 --- /dev/null +++ b/templates/misaki/main/supporttracker.twig @@ -0,0 +1 @@ +{% extends 'global/master.twig' %} diff --git a/templates/misaki/profile/comments.tpl b/templates/misaki/profile/comments.twig similarity index 100% rename from templates/misaki/profile/comments.tpl rename to templates/misaki/profile/comments.twig diff --git a/templates/misaki/profile/friends.tpl b/templates/misaki/profile/friends.twig similarity index 100% rename from templates/misaki/profile/friends.tpl rename to templates/misaki/profile/friends.twig diff --git a/templates/misaki/profile/groups.tpl b/templates/misaki/profile/groups.twig similarity index 100% rename from templates/misaki/profile/groups.tpl rename to templates/misaki/profile/groups.twig diff --git a/templates/misaki/profile/hidden.tpl b/templates/misaki/profile/hidden.twig similarity index 100% rename from templates/misaki/profile/hidden.tpl rename to templates/misaki/profile/hidden.twig diff --git a/templates/misaki/profile/index.tpl b/templates/misaki/profile/index.twig similarity index 100% rename from templates/misaki/profile/index.tpl rename to templates/misaki/profile/index.twig diff --git a/templates/misaki/profile/posts.tpl b/templates/misaki/profile/posts.twig similarity index 100% rename from templates/misaki/profile/posts.tpl rename to templates/misaki/profile/posts.twig diff --git a/templates/misaki/profile/threads.tpl b/templates/misaki/profile/threads.twig similarity index 100% rename from templates/misaki/profile/threads.tpl rename to templates/misaki/profile/threads.twig diff --git a/templates/misaki/settings/general.home.tpl b/templates/misaki/settings/general.home.twig similarity index 100% rename from templates/misaki/settings/general.home.tpl rename to templates/misaki/settings/general.home.twig diff --git a/templates/misaki/settings/general.options.tpl b/templates/misaki/settings/general.options.twig similarity index 100% rename from templates/misaki/settings/general.options.tpl rename to templates/misaki/settings/general.options.twig diff --git a/templates/yuuno/elements/captcha.tpl b/templates/yuuno/elements/captcha.twig similarity index 100% rename from templates/yuuno/elements/captcha.tpl rename to templates/yuuno/elements/captcha.twig diff --git a/templates/yuuno/elements/comment.tpl b/templates/yuuno/elements/comment.twig similarity index 97% rename from templates/yuuno/elements/comment.tpl rename to templates/yuuno/elements/comment.twig index 667ae72..6c5a304 100644 --- a/templates/yuuno/elements/comment.tpl +++ b/templates/yuuno/elements/comment.twig @@ -23,7 +23,7 @@ diff --git a/templates/yuuno/elements/comments.tpl b/templates/yuuno/elements/comments.twig similarity index 97% rename from templates/yuuno/elements/comments.tpl rename to templates/yuuno/elements/comments.twig index 690bad8..1ade73b 100644 --- a/templates/yuuno/elements/comments.tpl +++ b/templates/yuuno/elements/comments.twig @@ -26,7 +26,7 @@