1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +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

@@ -295,11 +295,11 @@ class mcp_reports
$global_id = $forum_list[0];
$sql = 'SELECT SUM(forum_topics) as sum_forum_topics
$sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
$result = $db->sql_query($sql);
$forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
$forum_info['forum_topics_approved'] = (int) $db->sql_fetchfield('sum_forum_topics');
$db->sql_freeresult($result);
}
else
@@ -331,7 +331,7 @@ class mcp_reports
$sort_by_sql = $sort_order_sql = array();
mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
$forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
if ($mode == 'reports')