From aed6479f40bc18cfdef9c2bb07be25e3f232db18 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 26 Jun 2003 20:40:32 +0000 Subject: [PATCH] small adjustment for editing informations and small fix for post editing. git-svn-id: file:///svn/phpbb/trunk@4179 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index b98b46e38f..3747c79e29 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -779,6 +779,7 @@ if ($submit || $preview || $refresh) $post_data = array( 'topic_first_post_id' => $topic_first_post_id, + 'topic_last_post_id' => $topic_last_post_id, 'post_id' => $post_id, 'topic_id' => $topic_id, 'forum_id' => $forum_id, @@ -1240,7 +1241,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ { $sql = 'UPDATE ' . POSTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $post_sql) . - (($data['poster_id'] == $user->data['user_id']) ? ' , post_edit_count = post_edit_count + 1' : '') . ' + (($data['poster_id'] == $user->data['user_id'] && $data['post_id'] != $data['topic_last_post_id']) ? ' , post_edit_count = post_edit_count + 1' : '') . ' WHERE post_id = ' . $data['post_id']; } else @@ -1426,6 +1427,13 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ set_config('num_posts', $config['num_posts'] + 1, TRUE); } + else if ($mode == 'edit' && $data['post_id'] == $data['topic_last_post_id'] && $poster_id == ANONYMOUS) + { + $sql = 'UPDATE ' . TOPICS_TABLE . " + SET topic_last_poster_name = '$stat_username' + WHERE topic_id = " . $data['topic_id']; + $db->sql_query($sql); + } // Topic Notification if (($data['notify_set'] == 0 || $data['notify_set'] == -1) && $data['notify'])