From 2f79bba1186bd676efc1061bb1cd32b4f2aabd5f Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 6 Nov 2015 13:05:35 +0100 Subject: [PATCH] Quick class name change --- _sakura/components/{Forum.php => Forums.php} | 2 +- _sakura/sakura.php | 2 +- public/index.php | 2 +- public/posting.php | 8 ++++---- public/viewforum.php | 2 +- public/viewtopic.php | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) rename _sakura/components/{Forum.php => Forums.php} (99%) diff --git a/_sakura/components/Forum.php b/_sakura/components/Forums.php similarity index 99% rename from _sakura/components/Forum.php rename to _sakura/components/Forums.php index 7f49bf4..d3d7230 100755 --- a/_sakura/components/Forum.php +++ b/_sakura/components/Forums.php @@ -9,7 +9,7 @@ namespace Sakura; * Class Forum * @package Sakura */ -class Forum +class Forums { // Empty forum template public static $emptyForum = [ diff --git a/_sakura/sakura.php b/_sakura/sakura.php index eb16125..509affc 100755 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -41,7 +41,7 @@ require_once ROOT . '_sakura/components/Session.php'; require_once ROOT . '_sakura/components/User.php'; require_once ROOT . '_sakura/components/Rank.php'; require_once ROOT . '_sakura/components/Users.php'; -require_once ROOT . '_sakura/components/Forum.php'; +require_once ROOT . '_sakura/components/Forums.php'; require_once ROOT . '_sakura/components/News.php'; require_once ROOT . '_sakura/components/Comments.php'; require_once ROOT . '_sakura/components/Manage.php'; diff --git a/public/index.php b/public/index.php index d6345c6..250696e 100755 --- a/public/index.php +++ b/public/index.php @@ -50,7 +50,7 @@ $renderData['page'] = [ ]; $renderData['board'] = [ - 'forums' => ($forumMode ? Forum::getForumList() : null), + 'forums' => ($forumMode ? Forums::getForumList() : null), 'viewforum' => false, 'viewtopic' => false, ]; diff --git a/public/posting.php b/public/posting.php index 4a281ea..fb6d3c0 100755 --- a/public/posting.php +++ b/public/posting.php @@ -14,13 +14,13 @@ $topicId = isset($_GET['t']) ? $_GET['t'] : ( isset($_GET['p']) ? - Forum::getTopicIdFromPostId($_GET['p']) : + Forums::getTopicIdFromPostId($_GET['p']) : 0 ); $forumId = isset($_GET['f']) ? $_GET['f'] : -Forum::getForumIdFromTopicId($topicId); +Forums::getForumIdFromTopicId($topicId); $mode = isset($_GET['f']) ? 'f' : (isset($_GET['t']) ? 't' : (isset($_GET['p']) ? 'p' : null)); @@ -105,7 +105,7 @@ if ($mode != 'f') { ]); // Reload the topic - $topic = Forum::getTopic($topicId, true); + $topic = Forums::getTopic($topicId, true); // If there's no more posts left in the topic delete it as well if (!count($topic['posts'])) { @@ -167,7 +167,7 @@ if (isset($_POST['post'])) { } // Attempt to make the post - $makePost = Forum::createPost($currentUser->data['user_id'], $_POST['subject'], $_POST['text'], $forumId, $topicId, $parse, 1, 1); + $makePost = Forums::createPost($currentUser->data['user_id'], $_POST['subject'], $_POST['text'], $forumId, $topicId, $parse, 1, 1); // Add page specific things $renderData['page'] = [ diff --git a/public/viewforum.php b/public/viewforum.php index 8b021ca..55b4614 100755 --- a/public/viewforum.php +++ b/public/viewforum.php @@ -10,7 +10,7 @@ namespace Sakura; require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php'; // Get the forum's data -$forum = Forum::getForum(isset($_GET['f']) ? $_GET['f'] : 0); +$forum = Forums::getForum(isset($_GET['f']) ? $_GET['f'] : 0); // Check if the forum exists if (!$forum) { diff --git a/public/viewtopic.php b/public/viewtopic.php index f0d571a..30b5e31 100755 --- a/public/viewtopic.php +++ b/public/viewtopic.php @@ -10,9 +10,9 @@ namespace Sakura; require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php'; // Attempt to get a topic -$topic = Forum::getTopic( +$topic = Forums::getTopic( isset($_GET['p']) - ? Forum::getTopicIdFromPostId($_GET['p']) + ? Forums::getTopicIdFromPostId($_GET['p']) : (isset($_GET['t']) ? $_GET['t'] : 0) );