diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-06-14 18:59:12 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-06-14 18:59:12 +0000 |
| commit | c9e971759db48d610c81f5f1ae4d054c130f635a (patch) | |
| tree | 6939f286bd7c54d4a9bc4ff6204b3ef95b9a7846 /phpBB/includes/functions_posting.php | |
| parent | 771d9f21cbcabd06535f1a32846b9fdc23f59df8 (diff) | |
| download | forums-c9e971759db48d610c81f5f1ae4d054c130f635a.tar forums-c9e971759db48d610c81f5f1ae4d054c130f635a.tar.gz forums-c9e971759db48d610c81f5f1ae4d054c130f635a.tar.bz2 forums-c9e971759db48d610c81f5f1ae4d054c130f635a.tar.xz forums-c9e971759db48d610c81f5f1ae4d054c130f635a.zip | |
- 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
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 85a89a3aa9..ff9867d11c 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -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; } |
