mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
git-svn-id: file:///svn/phpbb/trunk@7509 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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) . '\'';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user