aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2014-06-20 00:24:16 +0530
committerDhruv <dhruv.goel92@gmail.com>2014-08-07 17:19:14 +0200
commit17e360225d50fc3deac33697e24da43eab2ec8b1 (patch)
tree001c67d9de182fe34410af1218021e911541353a /phpBB/includes/functions_posting.php
parent9b36b5283cc29f59428206726f666554b0e0a358 (diff)
downloadforums-17e360225d50fc3deac33697e24da43eab2ec8b1.tar
forums-17e360225d50fc3deac33697e24da43eab2ec8b1.tar.gz
forums-17e360225d50fc3deac33697e24da43eab2ec8b1.tar.bz2
forums-17e360225d50fc3deac33697e24da43eab2ec8b1.tar.xz
forums-17e360225d50fc3deac33697e24da43eab2ec8b1.zip
[ticket/12718] Use remove_topic_from_statistic() for delete_topic
PHPBB3-12718
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index fb09bc7057..624ce187b9 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1324,18 +1324,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
{
delete_topics('topic_id', array($topic_id), false);
- if ($data['topic_visibility'] == ITEM_APPROVED)
- {
- $sql_data[FORUMS_TABLE] .= 'forum_posts_approved = forum_posts_approved - 1, forum_topics_approved = forum_topics_approved - 1';
- }
- else if ($data['topic_visibility'] == ITEM_UNAPPROVED || $data['post_visibility'] == ITEM_REAPPROVE)
- {
- $sql_data[FORUMS_TABLE] .= 'forum_posts_unapproved = forum_posts_unapproved - 1, forum_topics_unapproved = forum_topics_unapproved - 1';
- }
- else if ($data['topic_visibility'] == ITEM_DELETED)
- {
- $sql_data[FORUMS_TABLE] .= 'forum_posts_softdeleted = forum_posts_softdeleted - 1, forum_topics_softdeleted = forum_topics_softdeleted - 1';
- }
+ $phpbb_content_visibility->remove_topic_from_statistic($data, $sql_data);
$update_sql = update_post_information('forum', $forum_id, true);
if (sizeof($update_sql))