Public feed
#602120
--- C:\Documents and Settings\Dave\Local Settings\Temp\TCV30568.tmp\functions_posting.1.256.php Tue Jul 03 17:54:51 2007
+++ C:\Documents and Settings\Dave\Desktop\flexcvs\phpBB3\includes\functions_posting.php Tue Jul 03 18:02:38 2007
@@ -2019,7 +2019,7 @@
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
$sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
}
- else if ($post_mode == 'edit_last_post')
+ else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic')
{
// edit_last_post does not _necessarily_ mean that we must update the info again,
// it just means that we might have to
@@ -2169,13 +2169,13 @@
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time;
}
- else if ($post_mode == 'edit_last_post')
+ else if ($post_mode == 'edit_last_post' || ($post_mode == 'edit_topic' && $topic_row['topic_first_post_id'] == $topic_row['topic_last_post_id']))
{
// only the subject can be changed from edit
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
}
}
- else if (!$data['post_approved'] && $post_mode == 'edit_last_post')
+ else if (!$data['post_approved'] && ($post_mode == 'edit_last_post' || ($post_mode == 'edit_topic' && $topic_row['topic_first_post_id'] == $topic_row['topic_last_post_id'])))
{
// like having the rug pulled from under us
$sql = 'SELECT MAX(post_id) as last_post_id