diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-08-07 16:44:49 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-08-07 16:44:49 +0200 |
commit | ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6 (patch) | |
tree | 550d513947d722a7e294a047175cb1f8f17f012b /phpBB/includes/functions_posting.php | |
parent | 778483d070792dc5a6765de2d839110202b16346 (diff) | |
parent | 83e5a25c0a03b7b5ee9283201143bf2e6c94758e (diff) | |
download | forums-ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6.tar forums-ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6.tar.gz forums-ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6.tar.bz2 forums-ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6.tar.xz forums-ab8a197e92c491ac37f8ffe2fff1f7c6c42167b6.zip |
Merge pull request #2623 from dhruvgoel92/ticket/12738
[ticket/12738] Move related code from functions_posting to function
* dhruvgoel92/ticket/12738:
[ticket/12738] Update constructor docblock
[ticket/12738] Add $config to constructor in notification test
[ticket/12738] Fix tests with new config object injection
[ticket/12738] Inject config object into content_visibility class
[ticket/11528] Move related code from functions_posting to function
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f7e33725ec..fb09bc7057 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1431,20 +1431,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 |