aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-09-07 15:33:20 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-09-07 15:33:20 +0000
commit6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2 (patch)
treed608499650e328866a0e7758e36b42eba6048f75
parent028311c6f9b19f96952773d6c7f62911027bb662 (diff)
downloadforums-6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2.tar
forums-6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2.tar.gz
forums-6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2.tar.bz2
forums-6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2.tar.xz
forums-6aa059c403f3c8e301ccca32b2bb1446cb6bbbb2.zip
update topic stats if complete topic is stored for approval.
git-svn-id: file:///svn/phpbb/trunk@4478 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/posting.php7
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&amp;f=" . $data['forum_id'] . '&amp;t=' . $data['topic_id'] . '&amp;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'], '<br /><br /><a href="viewtopic.' . $phpEx . $SID .'&amp;f=' . $data['forum_id'] . '&amp;t=' . $data['topic_id'] . '&amp;p=' . $data['post_id'] . '#' . $data['post_id'] . '">', '</a>') : '') . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="viewforum.' . $phpEx . $SID .'&amp;f=' . $data['forum_id'] . '">', '</a>');
+ $message = $user->lang[$message] . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="viewtopic.' . $phpEx . $SID .'&amp;f=' . $data['forum_id'] . '&amp;t=' . $data['topic_id'] . '&amp;p=' . $data['post_id'] . '#' . $data['post_id'] . '">', '</a>') : '') . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="viewforum.' . $phpEx . $SID .'&amp;f=' . $data['forum_id'] . '">', '</a>');
trigger_error($message);
}