From 3eedb3fb470d7533209987db06febfc98c2b0e1d Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 9 May 2007 10:00:57 +0000 Subject: [PATCH] #10669 git-svn-id: file:///svn/phpbb/trunk@7509 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 2b2f7a8ced..e7615b8563 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1933,7 +1933,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u { // edit_last_post does not _necessarily_ mean that we must update the info again, // it just means that we might have to - $sql = 'SELECT forum_last_post_id + $sql = 'SELECT forum_last_post_id, forum_last_post_subject FROM ' . FORUMS_TABLE . ' WHERE forum_id = ' . (int) $data['forum_id']; $result = $db->sql_query($sql); @@ -1941,10 +1941,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $db->sql_freeresult($result); // this post is the last post in the forum, better update - if ($row['forum_last_post_id'] == $data['post_id']) + if ($row['forum_last_post_id'] == $data['post_id'] && $row['forum_last_post_subject'] !== $subject) { // the only data that can really be changed is the post's subject - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = ' . $db->sql_escape($subject); + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = \'' . $db->sql_escape($subject) . '\''; } } }