aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-09-07 17:10:43 +0000
committerChris Smith <toonarmy@phpbb.com>2008-09-07 17:10:43 +0000
commitaa6c728e6fea34142008a2c62cfd508cf4026824 (patch)
treeda92a32a00fc883a7ed69ef5fdfd803205d78ec2 /phpBB
parent674777246a2874bad99721189b84e1d875e46c53 (diff)
downloadforums-aa6c728e6fea34142008a2c62cfd508cf4026824.tar
forums-aa6c728e6fea34142008a2c62cfd508cf4026824.tar.gz
forums-aa6c728e6fea34142008a2c62cfd508cf4026824.tar.bz2
forums-aa6c728e6fea34142008a2c62cfd508cf4026824.tar.xz
forums-aa6c728e6fea34142008a2c62cfd508cf4026824.zip
Do not decrease topics counter when deleting shadow topics. #26495
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8836 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_admin.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index f0770e7fee..fdddd29895 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -118,6 +118,7 @@
<li>[Fix] Do not show non indexed forums on the search page if they contain no subforums. (Bug #33125)</li>
<li>[Fix] Stop search bots incrementing topic views. (Bug #32675 - Patch by eviL&lt;3)</li>
<li>[Fix] Use correct link for post author search. (Bug #32595)</li>
+ <li>[Fix] Do not decrease topics counter when deleting shadow topics. (Bug #26495)</li>
</ul>
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 9e89926e1a..0f5f10265f 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -551,7 +551,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0,
);
- $sql = 'SELECT topic_id, forum_id, topic_approved
+ $sql = 'SELECT topic_id, forum_id, topic_approved, topic_moved_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $where_clause;
$result = $db->sql_query($sql);
@@ -561,7 +561,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
$forum_ids[] = $row['forum_id'];
$topic_ids[] = $row['topic_id'];
- if ($row['topic_approved'])
+ if ($row['topic_approved'] && !$row['topic_moved_id'])
{
$approved_topics++;
}