aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_mcp.php
diff options
context:
space:
mode:
authorbrunoais <brunoaiss@gmail.com>2014-11-28 15:06:11 +0000
committerbrunoais <brunoaiss@gmail.com>2014-11-28 15:06:11 +0000
commitdfba919db8fb6bd50bf009f6124444a6ec460231 (patch)
tree3b7ab89edeeaf52f646894b3deef9b55032f2ebe /phpBB/includes/functions_mcp.php
parent8d8d54aac7d3f75e9b7d25f23c8bbe50de5220a3 (diff)
downloadforums-dfba919db8fb6bd50bf009f6124444a6ec460231.tar
forums-dfba919db8fb6bd50bf009f6124444a6ec460231.tar.gz
forums-dfba919db8fb6bd50bf009f6124444a6ec460231.tar.bz2
forums-dfba919db8fb6bd50bf009f6124444a6ec460231.tar.xz
forums-dfba919db8fb6bd50bf009f6124444a6ec460231.zip
[ticket/13142] Adding core.mcp_sorting_unapproved_deleted_posts_query_before
PHPBB3-13142
Diffstat (limited to 'phpBB/includes/functions_mcp.php')
-rw-r--r--phpBB/includes/functions_mcp.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index 7593f08f4d..5c3d1d02e6 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -423,6 +423,28 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
AND t.topic_id = p.topic_id
AND t.topic_visibility <> p.post_visibility';
+ /**
+ * This event allows you to control the SQL query to retrieve the list of unaproved and deleted posts
+ *
+ * @event core.mcp_sorting_unapproved_deleted_posts_query_before
+ * @var string sql The current SQL search string
+ * @var int forum_id The forum id of the posts the user is trying to access
+ * @var int topic_id The topic id of the posts the user is trying to access
+ * @var int min_time Integer with the minimum post time that the user is searching for
+ * @var int visibility_const Integer with one of the possible ITEM_* constant values
+ * @var string where_sql Extra information included in the WHERE clause. It must end with "WHERE" or "AND" or "OR"
+ * @since 3.1.1-RC1
+ */
+ $vars = array(
+ 'sql',
+ 'forum_id',
+ 'topic_id',
+ 'min_time',
+ 'visibility_const',
+ 'where_sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_sorting_unapproved_deleted_posts_query_before', compact($vars)));
+
if ($min_time)
{
$sql .= ' AND post_time >= ' . $min_time;