aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 1449346deb..3555eb3b48 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -197,7 +197,8 @@ if ($quickmod)
* @var bool is_valid_action Flag indicating if the action was handled properly
* @since 3.1.0-a4
*/
- extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'is_valid_action'))));
+ $vars = array('module', 'action', 'is_valid_action');
+ extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact($vars)));
if (!$is_valid_action)
{
@@ -266,7 +267,16 @@ if (!$user_id && $username == '')
* @var int id Parent module id
* @since 3.1.0-b2
*/
-$vars = array('module', 'mode', 'user_id', 'forum_id', 'topic_id', 'post_id', 'username', 'id');
+$vars = array(
+ 'module',
+ 'mode',
+ 'user_id',
+ 'forum_id',
+ 'topic_id',
+ 'post_id',
+ 'username',
+ 'id',
+);
extract($phpbb_dispatcher->trigger_event('core.modify_mcp_modules_display_option', compact($vars)));
// Load and execute the relevant module
@@ -677,7 +687,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
case 'unapproved_posts':
case 'deleted_posts':
- $visibility_const = ($mode == 'unapproved_posts') ? ITEM_UNAPPROVED : ITEM_DELETED;
+ $visibility_const = ($mode == 'unapproved_posts') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
$type = 'posts';
$default_key = 't';
$default_dir = 'd';
@@ -686,7 +696,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(p.post_id) AS total
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
$where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND p.post_visibility = ' . $visibility_const . '
+ AND ' . $db->sql_in_set('p.post_visibility', $visibility_const) .'
AND t.topic_id = p.topic_id
AND t.topic_visibility <> p.post_visibility';
@@ -698,7 +708,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
case 'unapproved_topics':
case 'deleted_topics':
- $visibility_const = ($mode == 'unapproved_topics') ? ITEM_UNAPPROVED : ITEM_DELETED;
+ $visibility_const = ($mode == 'unapproved_topics') ? array(ITEM_UNAPPROVED, ITEM_REAPPROVE) : ITEM_DELETED;
$type = 'topics';
$default_key = 't';
$default_dir = 'd';
@@ -706,7 +716,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(topic_id) AS total
FROM ' . TOPICS_TABLE . "
$where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND topic_visibility = ' . $visibility_const;
+ AND ' . $db->sql_in_set('topic_visibility', $visibility_const);
if ($min_time)
{