aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/auth.php5
-rw-r--r--phpBB/includes/mcp/mcp_front.php14
-rw-r--r--phpBB/includes/mcp/mcp_queue.php46
3 files changed, 64 insertions, 1 deletions
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 7ff3212b72..905e981cdc 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -183,7 +183,10 @@ class auth_admin extends \phpbb\auth\auth
}
// Defining the user-function here to save some memory
- $return_acl_fill = create_function('$value', 'return ' . $acl_fill . ';');
+ $return_acl_fill = function () use ($acl_fill)
+ {
+ return $acl_fill;
+ };
// Actually fill the gaps
if (sizeof($hold_ary))
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 98773d5b0e..b4ec0092e7 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -26,6 +26,7 @@ function mcp_front_view($id, $mode, $action)
{
global $phpEx, $phpbb_root_path, $config;
global $template, $db, $user, $auth, $module;
+ global $phpbb_dispatcher;
// Latest 5 unapproved
if ($module->loaded('queue'))
@@ -80,6 +81,19 @@ function mcp_front_view($id, $mode, $action)
}
}
+ /**
+ * Alter list of posts and total as required
+ *
+ * @event core.mcp_front_view_queue_postid_list_after
+ * @var int total Number of unapproved posts
+ * @var array post_list List of unapproved posts
+ * @var array forum_list List of forums that contain the posts
+ * @var array forum_names Associative array with forum_id as key and it's corresponding forum_name as value
+ * @since 3.1.0-RC3
+ */
+ $vars = array('total', 'post_list', 'forum_list', 'forum_names');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_front_view_queue_postid_list_after', compact($vars)));
+
if ($total)
{
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.post_attachment, p.poster_id, p.post_username, u.username, u.username_clean, u.user_colour, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 37ce3c6fc3..54b31c642a 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -429,6 +429,29 @@ class mcp_queue
OR t.topic_delete_user = 0)
$limit_time_sql
ORDER BY $sort_order_sql";
+
+ /**
+ * Alter sql query to get posts in queue to be accepted
+ *
+ * @event core.mcp_queue_get_posts_query_before
+ * @var string sql Associative array with the query to be executed
+ * @var array forum_list List of forums that contain the posts
+ * @var int visibility_const Integer with one of the possible ITEM_* constant values
+ * @var int topic_id If topic_id not equal to 0, the topic id to filter the posts to display
+ * @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string)
+ * @var string sort_order_sql String with the ORDER BY SQL code used in this query
+ * @since 3.1.0-RC3
+ */
+ $vars = array(
+ 'sql',
+ 'forum_list',
+ 'visibility_const',
+ 'topic_id',
+ 'limit_time_sql',
+ 'sort_order_sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_query_before', compact($vars)));
+
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
$i = 0;
@@ -478,6 +501,29 @@ class mcp_queue
AND topic_delete_user <> 0
$limit_time_sql
ORDER BY $sort_order_sql";
+
+ /**
+ * Alter sql query to get information on all topics in the list of forums provided.
+ *
+ * @event core.mcp_queue_get_posts_for_topics_query_before
+ * @var string sql String with the query to be executed
+ * @var array forum_list List of forums that contain the posts
+ * @var int visibility_const Integer with one of the possible ITEM_* constant values
+ * @var int topic_id topic_id in the page request
+ * @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string)
+ * @var string sort_order_sql String with the ORDER BY SQL code used in this query
+ * @since 3.1.0-RC3
+ */
+ $vars = array(
+ 'sql',
+ 'forum_list',
+ 'visibility_const',
+ 'topic_id',
+ 'limit_time_sql',
+ 'sort_order_sql',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_for_topics_query_before', compact($vars)));
+
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
$rowset = array();