1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[feature/soft-delete] Fix the rest of *_approved and the delete_post unit test

PHPBB3-9567
This commit is contained in:
Joas Schilling
2012-11-10 11:24:52 +01:00
parent 9c2a58eff4
commit f77a6eaab5
20 changed files with 75 additions and 76 deletions

View File

@@ -283,7 +283,7 @@ class acp_forums
@set_time_limit(0);
$sql = 'SELECT forum_name, (forum_topics + forum_topics_unapproved + forum_topics_softdeleted) AS total_topics
$sql = 'SELECT forum_name, (forum_topics_approved + forum_topics_unapproved + forum_topics_softdeleted) AS total_topics
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);

View File

@@ -636,14 +636,14 @@ class acp_users
if (sizeof($topic_id_ary))
{
$sql = 'SELECT topic_id, forum_id, topic_title, topic_posts, topic_posts_unapproved, topic_posts_softdeleted, topic_attachment
$sql = 'SELECT topic_id, forum_id, topic_title, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_attachment
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary));
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts']
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
&& $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
&& $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
{