r20151117
not a lot of changes today for reasons Signed-off-by: Flashwave <me@flash.moe>
This commit is contained in:
parent
bc36d74bba
commit
5b79940270
11 changed files with 29 additions and 18 deletions
|
@ -3,7 +3,9 @@
|
|||
* Forum class
|
||||
*/
|
||||
|
||||
namespace Sakura;
|
||||
namespace Sakura\Board;
|
||||
|
||||
use Sakura\Database;
|
||||
|
||||
/**
|
||||
* Class Forum
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
* Discussion Board
|
||||
*/
|
||||
|
||||
namespace Sakura;
|
||||
namespace Sakura\Board;
|
||||
|
||||
use Sakura\Main;
|
||||
use Sakura\Database;
|
||||
use Sakura\User;
|
||||
|
||||
/**
|
||||
* Class Forums
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
* Post class
|
||||
*/
|
||||
|
||||
namespace Sakura;
|
||||
namespace Sakura\Board;
|
||||
|
||||
use Sakura\Main;
|
||||
use Sakura\Database;
|
||||
use Sakura\User;
|
||||
|
||||
/**
|
||||
* Class Post
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
* Thread class
|
||||
*/
|
||||
|
||||
namespace Sakura;
|
||||
namespace Sakura\Board;
|
||||
|
||||
use Sakura\Database;
|
||||
|
||||
/**
|
||||
* Class Thread
|
||||
|
|
|
@ -191,7 +191,7 @@ class User
|
|||
// Get user's forum statistics
|
||||
public function forumStats()
|
||||
{
|
||||
return Forums::getUserStats($this->data['user_id']);
|
||||
return Board\Forums::getUserStats($this->data['user_id']);
|
||||
}
|
||||
|
||||
// Get amount of time since user events using the same format as dates()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20151116');
|
||||
define('SAKURA_VERSION', '20151117');
|
||||
define('SAKURA_VLABEL', 'Eminence');
|
||||
define('SAKURA_COLOUR', '#6C3082');
|
||||
define('SAKURA_STABLE', false);
|
||||
|
|
|
@ -255,8 +255,7 @@
|
|||
<li><a href="https://twitter.com/_flashii" target="_blank" title="Follow us on Twitter for news messages that are too short for the news page">Twitter</a></li>
|
||||
<li><a href="https://youtube.com/user/flashiinet" target="_blank" title="Our YouTube page where stuff barely ever gets uploaded, mainly used to archive community creations">YouTube</a></li>
|
||||
<li><a href="https://steamcommunity.com/groups/flashiinet" target="_blank" title="Our Steam group, play games with other members on the site">Steam</a></li>
|
||||
<li><a href="https://bitbucket.org/circlestorm" target="_blank" title="Our BitBucket organisation">BitBucket</a></li>
|
||||
<li><a href="https://github.com/circlestorm" target="_blank" title="Our GitHub organisation">GitHub</a></li>
|
||||
<li><a href="https://github.com/flashii" target="_blank" title="Our GitHub organisation">GitHub</a></li>
|
||||
</ul>
|
||||
<ul class="ftsection">
|
||||
<li class="fthead">Information</li>
|
||||
|
|
|
@ -50,7 +50,7 @@ $renderData['news'] = ($forumMode ? null : (new News(Config::getConfig('site_new
|
|||
|
||||
$renderData['newsCount'] = Config::getConfig('front_page_news_posts');
|
||||
|
||||
$renderData['forum'] = ($forumMode ? (new Forum()) : null);
|
||||
$renderData['forum'] = ($forumMode ? (new Board\Forum()) : null);
|
||||
|
||||
$renderData['stats'] = [
|
||||
'userCount' => Database::count('users', ['password_algo' => ['nologin', '!='], 'rank_main' => ['1', '!=']])[0],
|
||||
|
|
|
@ -20,13 +20,13 @@ $topicId = isset($_GET['t']) ?
|
|||
$_GET['t'] :
|
||||
(
|
||||
isset($_GET['p']) ?
|
||||
Forums::getTopicIdFromPostId($_GET['p']) :
|
||||
Board\Forums::getTopicIdFromPostId($_GET['p']) :
|
||||
0
|
||||
);
|
||||
|
||||
$forumId = isset($_GET['f']) ?
|
||||
$_GET['f'] :
|
||||
Forums::getForumIdFromTopicId($topicId);
|
||||
Board\Forums::getForumIdFromTopicId($topicId);
|
||||
|
||||
$mode = isset($_GET['f']) ? 'f' : (isset($_GET['t']) ? 't' : (isset($_GET['p']) ? 'p' : null));
|
||||
|
||||
|
@ -39,7 +39,7 @@ $posting = [
|
|||
// Check if we're in reply mode
|
||||
if ($mode != 'f') {
|
||||
// Attempt to get the topic
|
||||
$thread = Forums::getTopic($topicId, true);
|
||||
$thread = Board\Forums::getTopic($topicId, true);
|
||||
|
||||
// Prompt an error if the topic doesn't exist
|
||||
if (!$thread) {
|
||||
|
@ -120,7 +120,7 @@ if ($mode != 'f') {
|
|||
]);
|
||||
|
||||
// Reload the topic
|
||||
$thread = Forums::getTopic($topicId, true);
|
||||
$thread = Board\Forums::getTopic($topicId, true);
|
||||
|
||||
// If there's no more posts left in the topic delete it as well
|
||||
if (!count($thread['posts'])) {
|
||||
|
@ -173,7 +173,7 @@ if ($mode != 'f') {
|
|||
// Check if a post is being made
|
||||
if (isset($_POST['post'])) {
|
||||
// Attempt to make the post
|
||||
$makePost = Forums::createPost($currentUser->id(), $_POST['subject'], $_POST['text'], $forumId, $topicId, 1, 1, 1);
|
||||
$makePost = Board\Forums::createPost($currentUser->id(), $_POST['subject'], $_POST['text'], $forumId, $topicId, 1, 1, 1);
|
||||
|
||||
// Add page specific things
|
||||
$renderData['page'] = [
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Sakura;
|
|||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php';
|
||||
|
||||
// Get the forum's data
|
||||
$forum = new Forum(isset($_GET['f']) ? $_GET['f'] : -1);
|
||||
$forum = new Board\Forum(isset($_GET['f']) ? $_GET['f'] : -1);
|
||||
|
||||
// Initialise templating engine
|
||||
$template = new Template();
|
||||
|
|
|
@ -10,14 +10,14 @@ namespace Sakura;
|
|||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php';
|
||||
|
||||
// Attempt to get the thread
|
||||
$thread = new Thread(
|
||||
$thread = new Board\Thread(
|
||||
isset($_GET['p'])
|
||||
? Forums::getTopicIdFromPostId($_GET['p'])
|
||||
? Board\Forums::getTopicIdFromPostId($_GET['p'])
|
||||
: (isset($_GET['t']) ? $_GET['t'] : 0)
|
||||
);
|
||||
|
||||
// And attempt to get the forum
|
||||
$forum = new Forum($thread->forum);
|
||||
$forum = new Board\Forum($thread->forum);
|
||||
|
||||
// Initialise templating engine
|
||||
$template = new Template();
|
||||
|
|
Reference in a new issue