mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- did I mention I don't like mcp_sorting()? ;-)
git-svn-id: file:///svn/phpbb/trunk@5750 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ceb03a3804
commit
2372c30785
1 changed files with 12 additions and 1 deletions
|
@ -394,6 +394,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
break;
|
||||
|
||||
case 'reports':
|
||||
case 'reports_closed':
|
||||
$type = 'reports';
|
||||
$default_key = 't';
|
||||
$default_dir = 'd';
|
||||
|
@ -409,8 +410,18 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
|
|||
}
|
||||
else
|
||||
{
|
||||
$where_sql .= ' p.forum_id IN (' . implode(', ', get_forum_list('m_')) . ')';
|
||||
$where_sql .= ' p.forum_id IN (' . implode(', ', get_forum_list('m_report')) . ')';
|
||||
}
|
||||
|
||||
if ($mode == 'reports')
|
||||
{
|
||||
$where_sql .= 'AND r.report_closed = 0';
|
||||
}
|
||||
else
|
||||
{
|
||||
$where_sql .= 'AND r.report_closed = 1';
|
||||
}
|
||||
|
||||
$sql = 'SELECT COUNT(r.report_id) AS total
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . " p
|
||||
$where_sql
|
||||
|
|
Loading…
Add table
Reference in a new issue