Quick class name change

This commit is contained in:
Pachira 2015-11-06 13:05:35 +01:00
parent a6196f2357
commit 2f79bba118
6 changed files with 10 additions and 10 deletions

View file

@ -9,7 +9,7 @@ namespace Sakura;
* Class Forum
* @package Sakura
*/
class Forum
class Forums
{
// Empty forum template
public static $emptyForum = [

View file

@ -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';

View file

@ -50,7 +50,7 @@ $renderData['page'] = [
];
$renderData['board'] = [
'forums' => ($forumMode ? Forum::getForumList() : null),
'forums' => ($forumMode ? Forums::getForumList() : null),
'viewforum' => false,
'viewtopic' => false,
];

View file

@ -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'] = [

View file

@ -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) {

View file

@ -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)
);