From 27d6ee7561627c33122b08e89c81f67acf3b105f Mon Sep 17 00:00:00 2001 From: MrPMan Date: Thu, 24 Dec 2015 09:36:33 -0800 Subject: [PATCH] Fix #89 Possible off-by-one. --- sections/userhistory/post_history.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sections/userhistory/post_history.php b/sections/userhistory/post_history.php index 8d2fc1a7..874df6b2 100644 --- a/sections/userhistory/post_history.php +++ b/sections/userhistory/post_history.php @@ -70,9 +70,9 @@ p.TopicID, t.Title, t.LastPostID, - l.PostID AS LastRead, t.IsLocked, - t.IsSticky + t.IsSticky, + l.PostID AS LastRead FROM forums_posts AS p LEFT JOIN users_main AS um ON um.ID = p.AuthorID LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID @@ -104,14 +104,14 @@ ed.Username, p.TopicID, t.Title, - t.LastPostID,'; + t.LastPostID, + t.IsLocked, + t.IsSticky,'; if ($UserID == $LoggedUser['ID']) { $sql .= ' - l.PostID AS LastRead,'; + l.PostID AS LastRead'; } $sql .= " - t.IsLocked, - t.IsSticky FROM forums_posts AS p LEFT JOIN users_main AS um ON um.ID = p.AuthorID LEFT JOIN users_info AS ui ON ui.UserID = p.AuthorID @@ -213,7 +213,7 @@ get_query_id(); - while (list($PostID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername, $TopicID, $ThreadTitle, $LastPostID, $LastRead, $Locked, $Sticky) = $DB->next_record()) { + while (list($PostID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername, $TopicID, $ThreadTitle, $LastPostID, $Locked, $Sticky, $LastRead) = $DB->next_record()) { ?>