aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-02-20 19:54:02 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-02-20 19:54:02 +0100
commit31ae5748305704bdf58b20ed8d050fc6799e5a73 (patch)
tree2f39cb7a0b8daac47d8eeff3d2a2e058c5b0a547
parente4b44281737728c3af75fc6d1af13721cfe7d8be (diff)
parent93185574b5ad0f8460e75832a396566c2c3f9d49 (diff)
downloadforums-31ae5748305704bdf58b20ed8d050fc6799e5a73.tar
forums-31ae5748305704bdf58b20ed8d050fc6799e5a73.tar.gz
forums-31ae5748305704bdf58b20ed8d050fc6799e5a73.tar.bz2
forums-31ae5748305704bdf58b20ed8d050fc6799e5a73.tar.xz
forums-31ae5748305704bdf58b20ed8d050fc6799e5a73.zip
Merge pull request #3197 from brunoais/ticket/13142
[ticket/13142] Before query to list unapproved and deleted posts
-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 811d49f1de..4a03ea8f13 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 unapproved 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.4-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;