aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-06-26 20:40:32 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-06-26 20:40:32 +0000
commitaed6479f40bc18cfdef9c2bb07be25e3f232db18 (patch)
tree0a7e2c76ea7bb75c258555677786d21e36d25081
parentfd03f6c5f24588961cbe022f986db7a6e8e14c0f (diff)
downloadforums-aed6479f40bc18cfdef9c2bb07be25e3f232db18.tar
forums-aed6479f40bc18cfdef9c2bb07be25e3f232db18.tar.gz
forums-aed6479f40bc18cfdef9c2bb07be25e3f232db18.tar.bz2
forums-aed6479f40bc18cfdef9c2bb07be25e3f232db18.tar.xz
forums-aed6479f40bc18cfdef9c2bb07be25e3f232db18.zip
small adjustment for editing informations and small fix for post editing.
git-svn-id: file:///svn/phpbb/trunk@4179 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/posting.php10
1 files changed, 9 insertions, 1 deletions
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'])