mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[ticket/13660] Allow changing the query for total reports in mcp_front
PHPBB3-13660
This commit is contained in:
parent
18de60c0e0
commit
8b23272c33
@ -157,6 +157,18 @@ function mcp_front_view($id, $mode, $action)
|
||||
AND r.pm_id = 0
|
||||
AND r.report_closed = 0
|
||||
AND ' . $db->sql_in_set('p.forum_id', $forum_list);
|
||||
|
||||
/**
|
||||
* Alter sql query to count the number of reported posts
|
||||
*
|
||||
* @event core.mcp_front_reports_count_query_before
|
||||
* @var int sql The query string used to get the number of reports that exist
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @since 3.1.0-RC3
|
||||
*/
|
||||
$vars = array('sql', 'forum_list');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_count_query_before', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user