mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 22:14:59 +02:00
small adjustment for editing informations and small fix for post editing.
git-svn-id: file:///svn/phpbb/trunk@4179 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fd03f6c5f2
commit
aed6479f40
@ -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'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user