From 348e30cf4c5cc155b5493f7f4e756977e9524b4a Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 1 Jan 2016 05:30:27 +0100 Subject: [PATCH] early mornin gcommit --- libraries/Forum/Forum.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/Forum/Forum.php b/libraries/Forum/Forum.php index 2363d19..bae0e02 100644 --- a/libraries/Forum/Forum.php +++ b/libraries/Forum/Forum.php @@ -18,6 +18,7 @@ class Forum { // Variables public $id = 0; + public $order = 0; public $name = "Forum"; public $description = ""; public $link = ""; @@ -42,6 +43,7 @@ class Forum // Populate the variables if ($forumRow) { $this->id = $forumRow['forum_id']; + $this->order = $forumRow['forum_order']; $this->name = $forumRow['forum_name']; $this->description = $forumRow['forum_desc']; $this->link = $forumRow['forum_link']; @@ -75,7 +77,7 @@ class Forum // Check if _forums is populated if (!count($this->_forums)) { // Get all rows with the category id set to the forum id - $forumRows = Database::fetch('forums', true, ['forum_category' => [$this->id, '=']]); + $forumRows = Database::fetch('forums', true, ['forum_category' => [$this->id, '=']], ['forum_order']); // Create a storage array $forums = []; @@ -155,7 +157,7 @@ class Forum // Create the post object $post = new Post(empty($lastPost) ? 0 : $lastPost['post_id']); - + // Assign it to a "cache" variable $this->_lastPost = $post;