aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2014-06-19 23:04:03 +0530
committerDhruv <dhruv.goel92@gmail.com>2014-06-19 23:04:03 +0530
commit517273fa0bf77f40f51029e818bb36e15e7c6671 (patch)
treeeb0185f493cb97475bada9e64d7b35cd7ae462d1 /phpBB/includes/functions_posting.php
parent7ee3e3f73f2d602fd9eb0b67435aecb553c4b24d (diff)
downloadforums-517273fa0bf77f40f51029e818bb36e15e7c6671.tar
forums-517273fa0bf77f40f51029e818bb36e15e7c6671.tar.gz
forums-517273fa0bf77f40f51029e818bb36e15e7c6671.tar.bz2
forums-517273fa0bf77f40f51029e818bb36e15e7c6671.tar.xz
forums-517273fa0bf77f40f51029e818bb36e15e7c6671.zip
[ticket/11528] Move related code from functions_posting to function
Move related code from functions_posting to remove_post_from_statistic() in content_visibility.php PHPBB3-11528
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index d4e7fecbff..20798f9f1b 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1402,20 +1402,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
{
if (!$is_soft)
{
- if ($data['post_visibility'] == ITEM_APPROVED)
- {
- $phpbb_content_visibility->remove_post_from_statistic($data, $sql_data);
- }
- else if ($data['post_visibility'] == ITEM_UNAPPROVED || $data['post_visibility'] == ITEM_REAPPROVE)
- {
- $sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_unapproved = forum_posts_unapproved - 1';
- $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_unapproved = topic_posts_unapproved - 1';
- }
- else if ($data['post_visibility'] == ITEM_DELETED)
- {
- $sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_softdeleted = forum_posts_softdeleted - 1';
- $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_softdeleted = topic_posts_softdeleted - 1';
- }
+ $phpbb_content_visibility->remove_post_from_statistic($data, $sql_data);
}
$sql = 'SELECT 1 AS has_attachments