From 6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 7 Sep 2003 15:33:20 +0000 Subject: [PATCH] update topic stats if complete topic is stored for approval. git-svn-id: file:///svn/phpbb/trunk@4478 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 2 -- phpBB/posting.php | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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); }