diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d18a887807..858fd4d3ec 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -126,8 +126,6 @@ function update_last_post_information($type, $id, &$parent_sql) { global $db; - $parent_sql = array(); - switch ($type) { case 'forum': diff --git a/phpBB/posting.php b/phpBB/posting.php index b3bb773a56..040788769a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1853,7 +1853,10 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ { $sql_data['topic']['sql'] = array( 'topic_first_post_id' => $data['post_id'], - 'topic_last_post_id' => $data['post_id'] + 'topic_last_post_id' => $data['post_id'], + 'topic_last_post_time' => $current_time, + 'topic_last_poster_id' => (int) $user->data['user_id'], + 'topic_last_poster_name' => ($user->data['user_id'] == ANONYMOUS && !empty($username)) ? $username : $user->data['username'] ); } @@ -2097,7 +2100,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ meta_refresh(3, "viewtopic.$phpEx$SID&f=" . $data['forum_id'] . '&t=' . $data['topic_id'] . '&p=' . $data['post_id'] . '#' . $data['post_id']); $message = ($auth->acl_get('f_moderate', $data['forum_id'])) ? 'POST_STORED_MOD' : 'POST_STORED'; - $message = $user->lang[$message] . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? sprintf($user->lang['VIEW_MESSAGE'], '

', '') : '') . '

' . sprintf($user->lang['RETURN_FORUM'], '', ''); + $message = $user->lang[$message] . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? '

' . sprintf($user->lang['VIEW_MESSAGE'], '', '') : '') . '

' . sprintf($user->lang['RETURN_FORUM'], '', ''); trigger_error($message); }