Commit f9cef9d8 authored by Pramith Dayananda's avatar Pramith Dayananda
Browse files

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

behatnotneeded

Change-Id: I52cdd0199a30b0eaa6c067f079bb043ff92ce885
parent c8dbcce7
...@@ -123,7 +123,7 @@ $posts = get_records_sql_array( ...@@ -123,7 +123,7 @@ $posts = get_records_sql_array(
// This is only needed for the 'no_indent' option // This is only needed for the 'no_indent' option
$lastpostid = null; $lastpostid = null;
if ($indentmode == 'no_indent') { 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; $lastpostid = $lastpost->id;
} }
// Get extra info of posts // 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