mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/13455] Update calls to request_var()
PHPBB3-13455
This commit is contained in:
@@ -45,11 +45,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
}
|
||||
|
||||
$forum_id = $forum_info['forum_id'];
|
||||
$start = request_var('start', 0);
|
||||
$topic_id_list = request_var('topic_id_list', array(0));
|
||||
$post_id_list = request_var('post_id_list', array(0));
|
||||
$source_topic_ids = array(request_var('t', 0));
|
||||
$to_topic_id = request_var('to_topic_id', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
$topic_id_list = $request->variable('topic_id_list', array(0));
|
||||
$post_id_list = $request->variable('post_id_list', array(0));
|
||||
$source_topic_ids = array($request->variable('t', 0));
|
||||
$to_topic_id = $request->variable('to_topic_id', 0);
|
||||
|
||||
$url_extra = '';
|
||||
$url_extra .= ($forum_id) ? "&f=$forum_id" : '';
|
||||
@@ -63,7 +63,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
switch ($action)
|
||||
{
|
||||
case 'resync':
|
||||
$topic_ids = request_var('topic_id_list', array(0));
|
||||
$topic_ids = $request->variable('topic_id_list', array(0));
|
||||
mcp_resync_topics($topic_ids);
|
||||
break;
|
||||
|
||||
@@ -339,7 +339,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
*/
|
||||
function mcp_resync_topics($topic_ids)
|
||||
{
|
||||
global $auth, $db, $template, $phpEx, $user, $phpbb_root_path, $phpbb_log;
|
||||
global $auth, $db, $template, $phpEx, $user, $phpbb_root_path, $phpbb_log, $request;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -374,7 +374,7 @@ function mcp_resync_topics($topic_ids)
|
||||
|
||||
$msg = (sizeof($topic_ids) == 1) ? $user->lang['TOPIC_RESYNC_SUCCESS'] : $user->lang['TOPICS_RESYNC_SUCCESS'];
|
||||
|
||||
$redirect = request_var('redirect', $user->data['session_page']);
|
||||
$redirect = $request->variable('redirect', $user->data['session_page']);
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($msg . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
||||
@@ -387,7 +387,7 @@ function mcp_resync_topics($topic_ids)
|
||||
*/
|
||||
function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
{
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log;
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log, $request;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -418,8 +418,8 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
$topic_data = $topic_data[$to_topic_id];
|
||||
|
||||
$post_id_list = request_var('post_id_list', array(0));
|
||||
$start = request_var('start', 0);
|
||||
$post_id_list = $request->variable('post_id_list', array(0));
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
if (!sizeof($post_id_list) && sizeof($topic_ids))
|
||||
{
|
||||
@@ -447,7 +447,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'i' => 'main',
|
||||
@@ -496,7 +496,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
|
@@ -26,7 +26,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $template, $db, $user, $auth, $module;
|
||||
global $phpbb_dispatcher;
|
||||
global $phpbb_dispatcher, $request;
|
||||
|
||||
// Latest 5 unapproved
|
||||
if ($module->loaded('queue'))
|
||||
@@ -35,7 +35,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
$post_list = array();
|
||||
$forum_names = array();
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
$template->assign_var('S_SHOW_UNAPPROVED', (!empty($forum_list)) ? true : false);
|
||||
|
||||
|
@@ -35,12 +35,12 @@ class mcp_logs
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template;
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/common');
|
||||
|
||||
$action = request_var('action', array('' => ''));
|
||||
$action = $request->variable('action', array('' => ''));
|
||||
|
||||
if (is_array($action))
|
||||
{
|
||||
@@ -48,19 +48,19 @@ class mcp_logs
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = request_var('action', '');
|
||||
$action = $request->variable('action', '');
|
||||
}
|
||||
|
||||
// Set up general vars
|
||||
$start = request_var('start', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
$deletemark = ($action == 'del_marked') ? true : false;
|
||||
$deleteall = ($action == 'del_all') ? true : false;
|
||||
$marked = request_var('mark', array(0));
|
||||
$marked = $request->variable('mark', array(0));
|
||||
|
||||
// Sort keys
|
||||
$sort_days = request_var('st', 0);
|
||||
$sort_key = request_var('sk', 't');
|
||||
$sort_dir = request_var('sd', 'd');
|
||||
$sort_days = $request->variable('st', 0);
|
||||
$sort_key = $request->variable('sk', 't');
|
||||
$sort_dir = $request->variable('sd', 'd');
|
||||
|
||||
$this->tpl_name = 'mcp_logs';
|
||||
$this->page_title = 'MCP_LOGS';
|
||||
@@ -79,7 +79,7 @@ class mcp_logs
|
||||
break;
|
||||
|
||||
case 'forum_logs':
|
||||
$forum_id = request_var('f', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
if (!in_array($forum_id, $forum_list))
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class mcp_logs
|
||||
break;
|
||||
|
||||
case 'topic_logs':
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
@@ -124,7 +124,7 @@ class mcp_logs
|
||||
}
|
||||
else if ($deleteall)
|
||||
{
|
||||
$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
|
||||
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
|
||||
|
||||
$conditions = array(
|
||||
'forum_id' => array('IN' => $forum_list),
|
||||
@@ -158,7 +158,7 @@ class mcp_logs
|
||||
'sd' => $sort_dir,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => request_var('action', array('' => ''))))
|
||||
'action' => $request->variable('action', array('' => ''))))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -175,7 +175,7 @@ class mcp_logs
|
||||
$sql_where = ($sort_days) ? (time() - ($sort_days * 86400)) : 0;
|
||||
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
|
||||
$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
|
||||
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
|
||||
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
|
||||
|
||||
// Grab log data
|
||||
|
@@ -45,7 +45,7 @@ class mcp_main
|
||||
{
|
||||
case 'lock':
|
||||
case 'unlock':
|
||||
$topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -58,7 +58,7 @@ class mcp_main
|
||||
case 'lock_post':
|
||||
case 'unlock_post':
|
||||
|
||||
$post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0));
|
||||
$post_ids = (!$quickmod) ? $request->variable('post_id_list', array(0)) : array($request->variable('p', 0));
|
||||
|
||||
if (!sizeof($post_ids))
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class mcp_main
|
||||
case 'make_global':
|
||||
case 'make_normal':
|
||||
|
||||
$topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class mcp_main
|
||||
case 'move':
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
$topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -99,7 +99,7 @@ class mcp_main
|
||||
case 'fork':
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
$topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
|
||||
$topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -189,7 +189,7 @@ class mcp_main
|
||||
|
||||
$user->add_lang('viewforum');
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
|
||||
$forum_info = phpbb_get_forum_data($forum_id, 'm_', true);
|
||||
|
||||
@@ -273,7 +273,7 @@ function lock_unlock($action, $ids)
|
||||
}
|
||||
unset($orig_ids);
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
@@ -361,7 +361,7 @@ function change_topic_type($action, $topic_ids)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
$s_hidden_fields = array(
|
||||
@@ -441,8 +441,8 @@ function mcp_move_topic($topic_ids)
|
||||
return;
|
||||
}
|
||||
|
||||
$to_forum_id = request_var('to_forum_id', 0);
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$to_forum_id = $request->variable('to_forum_id', 0);
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$additional_msg = $success_msg = '';
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
@@ -662,7 +662,7 @@ function mcp_move_topic($topic_ids)
|
||||
confirm_box(false, 'MOVE_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
@@ -1163,16 +1163,16 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
function mcp_fork_topic($topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $template, $config;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_log;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_log, $request;
|
||||
|
||||
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$to_forum_id = request_var('to_forum_id', 0);
|
||||
$forum_id = request_var('f', 0);
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
$to_forum_id = $request->variable('to_forum_id', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
|
||||
$additional_msg = $success_msg = '';
|
||||
$counter = array();
|
||||
|
||||
@@ -1541,7 +1541,7 @@ function mcp_fork_topic($topic_ids)
|
||||
confirm_box(false, 'FORK_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
|
@@ -35,10 +35,10 @@ class mcp_notes
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template;
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
$action = request_var('action', array('' => ''));
|
||||
$action = $request->variable('action', array('' => ''));
|
||||
|
||||
if (is_array($action))
|
||||
{
|
||||
@@ -74,15 +74,15 @@ class mcp_notes
|
||||
*/
|
||||
function mcp_notes_user_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_log;
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_log, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_container;
|
||||
|
||||
$user_id = request_var('u', 0);
|
||||
$username = request_var('username', '', true);
|
||||
$start = request_var('start', 0);
|
||||
$st = request_var('st', 0);
|
||||
$sk = request_var('sk', 'b');
|
||||
$sd = request_var('sd', 'd');
|
||||
$user_id = $request->variable('u', 0);
|
||||
$username = $request->variable('username', '', true);
|
||||
$start = $request->variable('start', 0);
|
||||
$st = $request->variable('st', 0);
|
||||
$sk = $request->variable('sk', 'b');
|
||||
$sd = $request->variable('sd', 'd');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
@@ -116,8 +116,8 @@ class mcp_notes
|
||||
|
||||
$deletemark = ($action == 'del_marked') ? true : false;
|
||||
$deleteall = ($action == 'del_all') ? true : false;
|
||||
$marked = request_var('marknote', array(0));
|
||||
$usernote = utf8_normalize_nfc(request_var('usernote', '', true));
|
||||
$marked = $request->variable('marknote', array(0));
|
||||
$usernote = utf8_normalize_nfc($request->variable('usernote', '', true));
|
||||
|
||||
// Handle any actions
|
||||
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
|
||||
@@ -201,7 +201,7 @@ class mcp_notes
|
||||
$sql_where = ($st) ? (time() - ($st * 86400)) : 0;
|
||||
$sql_sort = $sort_by_sql[$sk] . ' ' . (($sd == 'd') ? 'DESC' : 'ASC');
|
||||
|
||||
$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
|
||||
$keywords = utf8_normalize_nfc($request->variable('keywords', '', true));
|
||||
$keywords_param = !empty($keywords) ? '&keywords=' . urlencode(htmlspecialchars_decode($keywords)) : '';
|
||||
|
||||
$log_data = array();
|
||||
|
@@ -35,7 +35,7 @@ class mcp_pm_reports
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $cache;
|
||||
global $auth, $db, $user, $template, $cache, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
@@ -43,7 +43,7 @@ class mcp_pm_reports
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$start = request_var('start', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
$this->page_title = 'MCP_PM_REPORTS';
|
||||
|
||||
@@ -53,7 +53,7 @@ class mcp_pm_reports
|
||||
case 'delete':
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
|
||||
$report_id_list = request_var('report_id_list', array(0));
|
||||
$report_id_list = $request->variable('report_id_list', array(0));
|
||||
|
||||
if (!sizeof($report_id_list))
|
||||
{
|
||||
@@ -76,7 +76,7 @@ class mcp_pm_reports
|
||||
|
||||
$user->add_lang(array('posting', 'viewforum', 'viewtopic', 'ucp'));
|
||||
|
||||
$report_id = request_var('r', 0);
|
||||
$report_id = $request->variable('r', 0);
|
||||
|
||||
$sql = 'SELECT r.pm_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
|
||||
@@ -201,7 +201,7 @@ class mcp_pm_reports
|
||||
'POST_SUBJECT' => ($pm_info['message_subject']) ? $pm_info['message_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_DATE' => $user->format_date($pm_info['message_time']),
|
||||
'POST_IP' => $pm_info['author_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_getf_global('m_info') && request_var('lookup', '')) ? @gethostbyaddr($pm_info['author_ip']) : '',
|
||||
'POST_IPADDR' => ($auth->acl_getf_global('m_info') && $request->variable('lookup', '')) ? @gethostbyaddr($pm_info['author_ip']) : '',
|
||||
'POST_ID' => $pm_info['msg_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_getf_global('m_info')) ? $this->u_action . '&r=' . $report_id . '&pm=' . $pm_id . '&lookup=' . $pm_info['author_ip'] . '#ip' : '',
|
||||
|
@@ -24,13 +24,13 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function mcp_post_details($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $phpEx, $phpbb_root_path, $config, $request;
|
||||
global $template, $db, $user, $auth, $cache;
|
||||
|
||||
$user->add_lang('posting');
|
||||
|
||||
$post_id = request_var('p', 0);
|
||||
$start = request_var('start', 0);
|
||||
$post_id = $request->variable('p', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
// Get post data
|
||||
$post_info = phpbb_get_post_data(array($post_id), false, true);
|
||||
@@ -51,7 +51,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||
{
|
||||
$ip = request_var('ip', '');
|
||||
$ip = $request->variable('ip', '');
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -72,12 +72,12 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
if ($action == 'chgposter')
|
||||
{
|
||||
$username = request_var('username', '', true);
|
||||
$username = $request->variable('username', '', true);
|
||||
$sql_where = "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_user_id = request_var('u', 0);
|
||||
$new_user_id = $request->variable('u', 0);
|
||||
$sql_where = 'user_id = ' . $new_user_id;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
'POST_SUBJECT' => $post_info['post_subject'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '',
|
||||
@@ -314,7 +314,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
// Get IP
|
||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||
{
|
||||
$rdns_ip_num = request_var('rdns', '');
|
||||
$rdns_ip_num = $request->variable('rdns', '');
|
||||
|
||||
if ($rdns_ip_num != 'all')
|
||||
{
|
||||
|
@@ -41,8 +41,8 @@ class mcp_queue
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$start = request_var('start', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
$this->page_title = 'MCP_QUEUE';
|
||||
|
||||
@@ -153,8 +153,8 @@ class mcp_queue
|
||||
|
||||
$user->add_lang(array('posting', 'viewtopic'));
|
||||
|
||||
$post_id = request_var('p', 0);
|
||||
$topic_id = request_var('t', 0);
|
||||
$post_id = $request->variable('p', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
@@ -319,7 +319,7 @@ class mcp_queue
|
||||
'POST_SUBJECT' => $post_info['post_subject'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
'S_FIRST_POST' => ($post_info['topic_first_post_id'] == $post_id),
|
||||
|
||||
|
@@ -35,13 +35,13 @@ class mcp_reports
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $cache;
|
||||
global $auth, $db, $user, $template, $cache, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
||||
$forum_id = request_var('f', 0);
|
||||
$start = request_var('start', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
$this->page_title = 'MCP_REPORTS';
|
||||
|
||||
@@ -51,7 +51,7 @@ class mcp_reports
|
||||
case 'delete':
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
|
||||
$report_id_list = request_var('report_id_list', array(0));
|
||||
$report_id_list = $request->variable('report_id_list', array(0));
|
||||
|
||||
if (!sizeof($report_id_list))
|
||||
{
|
||||
@@ -69,10 +69,10 @@ class mcp_reports
|
||||
|
||||
$user->add_lang(array('posting', 'viewforum', 'viewtopic'));
|
||||
|
||||
$post_id = request_var('p', 0);
|
||||
$post_id = $request->variable('p', 0);
|
||||
|
||||
// closed reports are accessed by report id
|
||||
$report_id = request_var('r', 0);
|
||||
$report_id = $request->variable('r', 0);
|
||||
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, r.reported_post_enable_magic_url, r.reported_post_enable_smilies, r.reported_post_enable_bbcode, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
|
||||
@@ -240,7 +240,7 @@ class mcp_reports
|
||||
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',
|
||||
@@ -252,7 +252,7 @@ class mcp_reports
|
||||
|
||||
case 'reports':
|
||||
case 'reports_closed':
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
|
||||
$forum_info = array();
|
||||
$forum_list_reports = get_forum_list('m_report', false, true);
|
||||
@@ -473,7 +473,7 @@ class mcp_reports
|
||||
*/
|
||||
function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
global $db, $template, $user, $config, $auth, $phpbb_log;
|
||||
global $db, $template, $user, $config, $auth, $phpbb_log, $request;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_container;
|
||||
|
||||
$pm_where = ($pm) ? ' AND r.post_id = 0 ' : ' AND r.pm_id = 0 ';
|
||||
@@ -510,19 +510,19 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
|
||||
if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=reports');
|
||||
$redirect = $request->variable('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=reports');
|
||||
}
|
||||
else if ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=pm_reports');
|
||||
$redirect = $request->variable('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=pm_reports');
|
||||
}
|
||||
else if ($action == 'close' && !request_var('r', 0))
|
||||
else if ($action == 'close' && !$request->variable('r', 0))
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', 'p', 'quickmod')) . '&mode=' . $module);
|
||||
$redirect = $request->variable('redirect', build_url(array('mode', 'p', 'quickmod')) . '&mode=' . $module);
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
}
|
||||
$success_msg = '';
|
||||
$forum_ids = array();
|
||||
@@ -720,7 +720,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
confirm_box(false, $user->lang[strtoupper($action) . "_{$pm_prefix}REPORT" . ((sizeof($report_id_list) == 1) ? '' : 'S') . '_CONFIRM'], $s_hidden_fields);
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
$redirect = $request->variable('redirect', "index.$phpEx");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
if (!$success_msg)
|
||||
|
@@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function mcp_topic_view($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $phpEx, $phpbb_root_path, $config, $request;
|
||||
global $template, $db, $user, $auth, $cache, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
|
||||
@@ -33,7 +33,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id), false, true);
|
||||
|
||||
if (!sizeof($topic_info))
|
||||
@@ -44,16 +44,16 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$topic_info = $topic_info[$topic_id];
|
||||
|
||||
// Set up some vars
|
||||
$icon_id = request_var('icon', 0);
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$start = request_var('start', 0);
|
||||
$sort_days_old = request_var('st_old', 0);
|
||||
$forum_id = request_var('f', 0);
|
||||
$to_topic_id = request_var('to_topic_id', 0);
|
||||
$to_forum_id = request_var('to_forum_id', 0);
|
||||
$icon_id = $request->variable('icon', 0);
|
||||
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
|
||||
$start = $request->variable('start', 0);
|
||||
$sort_days_old = $request->variable('st_old', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$to_topic_id = $request->variable('to_topic_id', 0);
|
||||
$to_forum_id = $request->variable('to_forum_id', 0);
|
||||
$sort = isset($_POST['sort']) ? true : false;
|
||||
$submitted_id_list = request_var('post_ids', array(0));
|
||||
$checked_ids = $post_id_list = request_var('post_id_list', array(0));
|
||||
$submitted_id_list = $request->variable('post_ids', array(0));
|
||||
$checked_ids = $post_id_list = $request->variable('post_id_list', array(0));
|
||||
|
||||
// Resync Topic?
|
||||
if ($action == 'resync')
|
||||
@@ -126,7 +126,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$total = $phpbb_content_visibility->get_count('topic_posts', $topic_info, $topic_info['forum_id']);
|
||||
}
|
||||
|
||||
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
|
||||
$posts_per_page = max(0, $request->variable('posts_per_page', intval($config['posts_per_page'])));
|
||||
if ($posts_per_page == 0)
|
||||
{
|
||||
$posts_per_page = $total;
|
||||
@@ -388,11 +388,11 @@ function mcp_topic_view($id, $mode, $action)
|
||||
*/
|
||||
function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
{
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $config, $phpbb_log;
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $config, $phpbb_log, $request;
|
||||
|
||||
$post_id_list = request_var('post_id_list', array(0));
|
||||
$forum_id = request_var('forum_id', 0);
|
||||
$start = request_var('start', 0);
|
||||
$post_id_list = $request->variable('post_id_list', array(0));
|
||||
$forum_id = $request->variable('forum_id', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
if (!sizeof($post_id_list))
|
||||
{
|
||||
@@ -446,7 +446,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'i' => 'main',
|
||||
@@ -459,7 +459,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
'redirect' => $redirect,
|
||||
'subject' => $subject,
|
||||
'to_forum_id' => $to_forum_id,
|
||||
'icon' => request_var('icon', 0))
|
||||
'icon' => $request->variable('icon', 0))
|
||||
);
|
||||
$success_msg = $return_link = '';
|
||||
|
||||
@@ -522,7 +522,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
trigger_error('NO_POST_SELECTED');
|
||||
}
|
||||
|
||||
$icon_id = request_var('icon', 0);
|
||||
$icon_id = $request->variable('icon', 0);
|
||||
|
||||
$sql_ary = array(
|
||||
'forum_id' => $to_forum_id,
|
||||
@@ -607,7 +607,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
|
||||
// Link back to both topics
|
||||
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
@@ -624,7 +624,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
*/
|
||||
function merge_posts($topic_id, $to_topic_id)
|
||||
{
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log;
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log, $request;
|
||||
|
||||
if (!$to_topic_id)
|
||||
{
|
||||
@@ -650,8 +650,8 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
$topic_data = $topic_data[$to_topic_id];
|
||||
|
||||
$post_id_list = request_var('post_id_list', array(0));
|
||||
$start = request_var('start', 0);
|
||||
$post_id_list = $request->variable('post_id_list', array(0));
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
if (!sizeof($post_id_list))
|
||||
{
|
||||
@@ -664,7 +664,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('quickmod')));
|
||||
$redirect = $request->variable('redirect', build_url(array('quickmod')));
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'i' => 'main',
|
||||
@@ -727,7 +727,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
// Link to the new topic
|
||||
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>');
|
||||
$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
|
@@ -35,10 +35,10 @@ class mcp_warn
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template;
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
$action = request_var('action', array('' => ''));
|
||||
$action = $request->variable('action', array('' => ''));
|
||||
|
||||
if (is_array($action))
|
||||
{
|
||||
@@ -132,16 +132,16 @@ class mcp_warn
|
||||
function mcp_warn_list_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_container;
|
||||
global $template, $db, $user, $auth;
|
||||
global $template, $db, $user, $auth, $request;
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$st = request_var('st', 0);
|
||||
$sk = request_var('sk', 'b');
|
||||
$sd = request_var('sd', 'd');
|
||||
$start = $request->variable('start', 0);
|
||||
$st = $request->variable('st', 0);
|
||||
$sk = $request->variable('sk', 'b');
|
||||
$sd = $request->variable('sd', 'd');
|
||||
|
||||
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
|
||||
$sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']);
|
||||
@@ -190,13 +190,13 @@ class mcp_warn
|
||||
*/
|
||||
function mcp_warn_post_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $phpEx, $phpbb_root_path, $config, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$post_id = request_var('p', 0);
|
||||
$forum_id = request_var('f', 0);
|
||||
$post_id = $request->variable('p', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
|
||||
$warning = utf8_normalize_nfc(request_var('warning', '', true));
|
||||
$warning = utf8_normalize_nfc($request->variable('warning', '', true));
|
||||
|
||||
$sql = 'SELECT u.*, p.*
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
@@ -370,13 +370,13 @@ class mcp_warn
|
||||
*/
|
||||
function mcp_warn_user_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $module;
|
||||
global $phpEx, $phpbb_root_path, $config, $module, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$user_id = request_var('u', 0);
|
||||
$username = request_var('username', '', true);
|
||||
$user_id = $request->variable('u', 0);
|
||||
$username = $request->variable('username', '', true);
|
||||
$notify = (isset($_REQUEST['notify_user'])) ? true : false;
|
||||
$warning = utf8_normalize_nfc(request_var('warning', '', true));
|
||||
$warning = utf8_normalize_nfc($request->variable('warning', '', true));
|
||||
|
||||
$sql_where = ($user_id) ? "user_id = $user_id" : "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
|
||||
|
Reference in New Issue
Block a user