mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
parent
674777246a
commit
aa6c728e6f
2 changed files with 3 additions and 2 deletions
|
@ -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] 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<3)</li>
|
<li>[Fix] Stop search bots incrementing topic views. (Bug #32675 - Patch by eviL<3)</li>
|
||||||
<li>[Fix] Use correct link for post author search. (Bug #32595)</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>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -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,
|
'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 . '
|
FROM ' . TOPICS_TABLE . '
|
||||||
WHERE ' . $where_clause;
|
WHERE ' . $where_clause;
|
||||||
$result = $db->sql_query($sql);
|
$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'];
|
$forum_ids[] = $row['forum_id'];
|
||||||
$topic_ids[] = $row['topic_id'];
|
$topic_ids[] = $row['topic_id'];
|
||||||
|
|
||||||
if ($row['topic_approved'])
|
if ($row['topic_approved'] && !$row['topic_moved_id'])
|
||||||
{
|
{
|
||||||
$approved_topics++;
|
$approved_topics++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue