1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

- automatically sync topic_reported when deleting a post [Bug #2152]

- retrieve forum information in report.php
- don't update deleted topics
- proper permission check for "admin or moderator"
- allow changing poster while ip dropdown contains a different user [Bug #2190]
- fixed a typo in acp_styles [Bug #2188]
- allow inserting BBCode at the first position of the textarea [Bug #2078]
- allow the style name to be different than the style path


git-svn-id: file:///svn/phpbb/trunk@6063 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2006-06-14 18:59:12 +00:00
parent 771d9f21cb
commit c9e971759d
10 changed files with 53 additions and 52 deletions

View File

@@ -1139,7 +1139,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
if (!delete_posts('post_id', array($post_id), false, false))
{
// Try to delete topic, we may had an previous error causing inconsistency
if ($post_mode = 'delete_topic')
if ($post_mode == 'delete_topic')
{
delete_topics('topic_id', array($topic_id), false);
}
@@ -1148,7 +1148,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
$db->sql_transaction('commit');
// Collect the necessary informations for updating the tables
// Collect the necessary information for updating the tables
$sql_data[FORUMS_TABLE] = '';
switch ($post_mode)
{
@@ -1168,8 +1168,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
$sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
$sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
}
$sql_data[TOPICS_TABLE] = 'topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
break;
case 'delete_first_post':
@@ -1291,6 +1289,11 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
}
}
if ($data['post_reported'] && ($post_mode != 'delete_topic'))
{
sync('topic_reported', 'topic_id', array($topic_id));
}
return $next_post_id;
}