[ticket/12612] Prefix check_ids() with phpbb_

PHPBB3-12612
This commit is contained in:
Joas Schilling 2014-06-23 23:01:52 +02:00
parent 4ac43856f7
commit 952b4de231
6 changed files with 17 additions and 17 deletions

View file

@ -594,7 +594,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
* Additionally, this value can be the forum_id assigned if $single_forum was set.
* Therefore checking the result for with !== false is the best method.
*/
function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false)
function phpbb_check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = false)
{
global $db, $auth;

View file

@ -328,7 +328,7 @@ function mcp_resync_topics($topic_ids)
trigger_error('NO_TOPIC_SELECTED');
}
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
return;
}
@ -420,7 +420,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
return;
}
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
{
return;
}

View file

@ -252,7 +252,7 @@ function lock_unlock($action, $ids)
$orig_ids = $ids;
if (!check_ids($ids, $table, $sql_id, array('m_lock')))
if (!phpbb_check_ids($ids, $table, $sql_id, array('m_lock')))
{
// Make sure that for f_user_lock only the lock action is triggered.
if ($action != 'lock')
@ -262,7 +262,7 @@ function lock_unlock($action, $ids)
$ids = $orig_ids;
if (!check_ids($ids, $table, $sql_id, array('f_user_lock')))
if (!phpbb_check_ids($ids, $table, $sql_id, array('f_user_lock')))
{
return;
}
@ -346,7 +346,7 @@ function change_topic_type($action, $topic_ids)
break;
}
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
$forum_id = phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
if ($forum_id === false)
{
@ -422,7 +422,7 @@ function mcp_move_topic($topic_ids)
global $phpEx, $phpbb_root_path;
// Here we limit the operation to one forum only
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
$forum_id = phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
if ($forum_id === false)
{
@ -677,7 +677,7 @@ function mcp_restore_topic($topic_ids)
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
return;
}
@ -750,7 +750,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
{
return;
}
@ -878,7 +878,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
{
return;
}
@ -1105,7 +1105,7 @@ function mcp_fork_topic($topic_ids)
global $auth, $user, $db, $template, $config;
global $phpEx, $phpbb_root_path;
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
return;
}

View file

@ -572,7 +572,7 @@ class mcp_queue
global $db, $template, $user, $config, $request, $phpbb_container;
global $phpEx, $phpbb_root_path;
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}
@ -795,7 +795,7 @@ class mcp_queue
global $db, $template, $user, $config;
global $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}
@ -964,7 +964,7 @@ class mcp_queue
global $db, $template, $user, $config, $phpbb_container;
global $phpEx, $phpbb_root_path, $request;
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
trigger_error('NOT_AUTHORISED');
}

View file

@ -479,7 +479,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
}
else
{
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
{
trigger_error('NOT_AUTHORISED');
}

View file

@ -368,7 +368,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
return;
}
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
{
return;
}
@ -619,7 +619,7 @@ function merge_posts($topic_id, $to_topic_id)
return;
}
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
{
return;
}