Commit 5190027b authored by Pramith Dayananda's avatar Pramith Dayananda Committed by Robert Lyon

Bug 1587474: No indents forum reply fails when the last post has been deleted

behatnotneeded

Change-Id: I52cdd0199a30b0eaa6c067f079bb043ff92ce885
(cherry picked from commit f9cef9d8)
parent e5e7b38c
......@@ -121,7 +121,7 @@ $posts = get_records_sql_array(
// This is only needed for the 'no_indent' option
$lastpostid = null;
if ($indentmode == 'no_indent') {
$lastpost = get_record_select('interaction_forum_post', 'topic = ? ORDER by ctime DESC, id DESC LIMIT 1', array($topicid));
$lastpost = get_record_select('interaction_forum_post', 'topic = ? AND deleted != 1 ORDER by ctime DESC, id DESC LIMIT 1', array($topicid));
$lastpostid = $lastpost->id;
}
// Get extra info of posts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment