mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/13455] Update calls to request_var()
PHPBB3-13455
This commit is contained in:
@@ -29,11 +29,11 @@ class ucp_activate
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
global $db, $user, $auth, $template, $phpbb_container, $phpbb_log;
|
||||
|
||||
$user_id = request_var('u', 0);
|
||||
$key = request_var('k', '');
|
||||
$user_id = $request->variable('u', 0);
|
||||
$key = $request->variable('k', '');
|
||||
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
|
||||
FROM ' . USERS_TABLE . "
|
||||
|
@@ -29,15 +29,15 @@ class ucp_attachments
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $phpbb_container;
|
||||
global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $phpbb_container, $request;
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$sort_key = request_var('sk', 'a');
|
||||
$sort_dir = request_var('sd', 'a');
|
||||
$start = $request->variable('start', 0);
|
||||
$sort_key = $request->variable('sk', 'a');
|
||||
$sort_dir = $request->variable('sd', 'a');
|
||||
|
||||
$delete = (isset($_POST['delete'])) ? true : false;
|
||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
||||
$delete_ids = array_keys(request_var('attachment', array(0)));
|
||||
$delete_ids = array_keys($request->variable('attachment', array(0)));
|
||||
|
||||
if ($delete && sizeof($delete_ids))
|
||||
{
|
||||
|
@@ -36,10 +36,10 @@ class ucp_confirm
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container;
|
||||
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container, $request;
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(request_var('type', 0));
|
||||
$captcha->init($request->variable('type', 0));
|
||||
$captcha->execute();
|
||||
|
||||
garbage_collection();
|
||||
|
@@ -36,7 +36,7 @@ class ucp_groups
|
||||
|
||||
$return_page = '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '">', '</a>');
|
||||
|
||||
$mark_ary = request_var('mark', array(0));
|
||||
$mark_ary = $request->variable('mark', array(0));
|
||||
$submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
|
||||
$delete = $request->variable('delete', false, false, \phpbb\request\request_interface::POST);
|
||||
$error = $data = array();
|
||||
@@ -49,8 +49,8 @@ class ucp_groups
|
||||
|
||||
if ($submit || isset($_POST['change_default']))
|
||||
{
|
||||
$action = (isset($_POST['change_default'])) ? 'change_default' : request_var('action', '');
|
||||
$group_id = ($action == 'change_default') ? request_var('default', 0) : request_var('selected', 0);
|
||||
$action = (isset($_POST['change_default'])) ? 'change_default' : $request->variable('action', '');
|
||||
$group_id = ($action == 'change_default') ? $request->variable('default', 0) : $request->variable('selected', 0);
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
@@ -391,8 +391,8 @@ class ucp_groups
|
||||
case 'manage':
|
||||
|
||||
$this->page_title = 'UCP_USERGROUPS_MANAGE';
|
||||
$action = (isset($_POST['addusers'])) ? 'addusers' : request_var('action', '');
|
||||
$group_id = request_var('g', 0);
|
||||
$action = (isset($_POST['addusers'])) ? 'addusers' : $request->variable('action', '');
|
||||
$group_id = $request->variable('g', 0);
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
|
||||
@@ -510,20 +510,20 @@ class ucp_groups
|
||||
// Did we submit?
|
||||
if ($update)
|
||||
{
|
||||
$group_name = utf8_normalize_nfc(request_var('group_name', '', true));
|
||||
$group_desc = utf8_normalize_nfc(request_var('group_desc', '', true));
|
||||
$group_type = request_var('group_type', GROUP_FREE);
|
||||
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
|
||||
$group_desc = utf8_normalize_nfc($request->variable('group_desc', '', true));
|
||||
$group_type = $request->variable('group_type', GROUP_FREE);
|
||||
|
||||
$allow_desc_bbcode = request_var('desc_parse_bbcode', false);
|
||||
$allow_desc_urls = request_var('desc_parse_urls', false);
|
||||
$allow_desc_smilies = request_var('desc_parse_smilies', false);
|
||||
$allow_desc_bbcode = $request->variable('desc_parse_bbcode', false);
|
||||
$allow_desc_urls = $request->variable('desc_parse_urls', false);
|
||||
$allow_desc_smilies = $request->variable('desc_parse_smilies', false);
|
||||
|
||||
$submit_ary = array(
|
||||
'colour' => request_var('group_colour', ''),
|
||||
'rank' => request_var('group_rank', 0),
|
||||
'colour' => $request->variable('group_colour', ''),
|
||||
'rank' => $request->variable('group_rank', 0),
|
||||
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
|
||||
'message_limit' => request_var('group_message_limit', 0),
|
||||
'max_recipients'=> request_var('group_max_recipients', 0),
|
||||
'message_limit' => $request->variable('group_message_limit', 0),
|
||||
'max_recipients'=> $request->variable('group_max_recipients', 0),
|
||||
'legend' => $group_row['group_legend'],
|
||||
'teampage' => $group_row['group_teampage'],
|
||||
);
|
||||
@@ -621,7 +621,7 @@ class ucp_groups
|
||||
}
|
||||
else if (!$group_id)
|
||||
{
|
||||
$group_name = utf8_normalize_nfc(request_var('group_name', '', true));
|
||||
$group_name = utf8_normalize_nfc($request->variable('group_name', '', true));
|
||||
$group_desc_data = array(
|
||||
'text' => '',
|
||||
'allow_bbcode' => true,
|
||||
@@ -750,7 +750,7 @@ class ucp_groups
|
||||
}
|
||||
|
||||
$user->add_lang(array('acp/groups', 'acp/common'));
|
||||
$start = request_var('start', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
// Grab the leaders - always, on every page...
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
@@ -1018,7 +1018,7 @@ class ucp_groups
|
||||
|
||||
$user->add_lang(array('acp/groups', 'acp/common'));
|
||||
|
||||
$names = utf8_normalize_nfc(request_var('usernames', '', true));
|
||||
$names = utf8_normalize_nfc($request->variable('usernames', '', true));
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
@@ -1044,7 +1044,7 @@ class ucp_groups
|
||||
$name_ary = array_unique(explode("\n", $names));
|
||||
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
|
||||
$default = request_var('default', 0);
|
||||
$default = $request->variable('default', 0);
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
|
@@ -219,8 +219,8 @@ class ucp_main
|
||||
{
|
||||
if (check_form_key('ucp_front_subscribed'))
|
||||
{
|
||||
$forums = array_keys(request_var('f', array(0 => 0)));
|
||||
$topics = array_keys(request_var('t', array(0 => 0)));
|
||||
$forums = array_keys($request->variable('f', array(0 => 0)));
|
||||
$topics = array_keys($request->variable('t', array(0 => 0)));
|
||||
$msg = '';
|
||||
|
||||
if (sizeof($forums) || sizeof($topics))
|
||||
@@ -401,7 +401,7 @@ class ucp_main
|
||||
if (isset($_POST['unbookmark']))
|
||||
{
|
||||
$s_hidden_fields = array('unbookmark' => 1);
|
||||
$topics = (isset($_POST['t'])) ? array_keys(request_var('t', array(0 => 0))) : array();
|
||||
$topics = (isset($_POST['t'])) ? array_keys($request->variable('t', array(0 => 0))) : array();
|
||||
$url = $this->u_action;
|
||||
|
||||
if (!sizeof($topics))
|
||||
@@ -457,7 +457,7 @@ class ucp_main
|
||||
{
|
||||
if (check_form_key('ucp_draft'))
|
||||
{
|
||||
$drafts = array_keys(request_var('d', array(0 => 0)));
|
||||
$drafts = array_keys($request->variable('d', array(0 => 0)));
|
||||
|
||||
if (sizeof($drafts))
|
||||
{
|
||||
@@ -480,8 +480,8 @@ class ucp_main
|
||||
|
||||
if ($submit && $edit)
|
||||
{
|
||||
$draft_subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$draft_message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
$draft_subject = utf8_normalize_nfc($request->variable('subject', '', true));
|
||||
$draft_message = utf8_normalize_nfc($request->variable('message', '', true));
|
||||
if (check_form_key('ucp_draft'))
|
||||
{
|
||||
if ($draft_message && $draft_subject)
|
||||
@@ -643,12 +643,12 @@ class ucp_main
|
||||
*/
|
||||
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
|
||||
{
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request;
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
|
||||
$start = request_var('start', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
// Grab icons
|
||||
$icons = $cache->obtain_icons();
|
||||
|
@@ -62,7 +62,7 @@ class ucp_pm
|
||||
$template->assign_var('S_PRIVMSGS', true);
|
||||
|
||||
// Folder directly specified?
|
||||
$folder_specified = request_var('folder', '');
|
||||
$folder_specified = $request->variable('folder', '');
|
||||
|
||||
if (!in_array($folder_specified, array('inbox', 'outbox', 'sentbox')))
|
||||
{
|
||||
@@ -75,7 +75,7 @@ class ucp_pm
|
||||
|
||||
if (!$folder_specified)
|
||||
{
|
||||
$mode = (!$mode) ? request_var('mode', 'view') : $mode;
|
||||
$mode = (!$mode) ? $request->variable('mode', 'view') : $mode;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -88,7 +88,7 @@ class ucp_pm
|
||||
{
|
||||
// Compose message
|
||||
case 'compose':
|
||||
$action = request_var('action', 'post');
|
||||
$action = $request->variable('action', 'post');
|
||||
|
||||
$user_folders = get_folder($user->data['user_id']);
|
||||
|
||||
@@ -151,12 +151,12 @@ class ucp_pm
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_id = request_var('f', PRIVMSGS_NO_BOX);
|
||||
$action = request_var('action', 'view_folder');
|
||||
$folder_id = $request->variable('f', PRIVMSGS_NO_BOX);
|
||||
$action = $request->variable('action', 'view_folder');
|
||||
}
|
||||
|
||||
$msg_id = request_var('p', 0);
|
||||
$view = request_var('view', '');
|
||||
$msg_id = $request->variable('p', 0);
|
||||
$view = $request->variable('view', '');
|
||||
|
||||
// View message if specified
|
||||
if ($msg_id)
|
||||
@@ -178,8 +178,8 @@ class ucp_pm
|
||||
// First Handle Mark actions and moving messages
|
||||
$submit_mark = (isset($_POST['submit_mark'])) ? true : false;
|
||||
$move_pm = (isset($_POST['move_pm'])) ? true : false;
|
||||
$mark_option = request_var('mark_option', '');
|
||||
$dest_folder = request_var('dest_folder', PRIVMSGS_NO_BOX);
|
||||
$mark_option = $request->variable('mark_option', '');
|
||||
$dest_folder = $request->variable('dest_folder', PRIVMSGS_NO_BOX);
|
||||
|
||||
// Is moving PM triggered through mark options?
|
||||
if (!in_array($mark_option, array('mark_important', 'delete_marked')) && $submit_mark)
|
||||
@@ -192,8 +192,8 @@ class ucp_pm
|
||||
// Move PM
|
||||
if ($move_pm)
|
||||
{
|
||||
$move_msg_ids = (isset($_POST['marked_msg_id'])) ? request_var('marked_msg_id', array(0)) : array();
|
||||
$cur_folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
$move_msg_ids = (isset($_POST['marked_msg_id'])) ? $request->variable('marked_msg_id', array(0)) : array();
|
||||
$cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
|
||||
if (move_pm($user->data['user_id'], $user->data['message_limit'], $move_msg_ids, $dest_folder, $cur_folder_id))
|
||||
{
|
||||
@@ -201,7 +201,7 @@ class ucp_pm
|
||||
if ($action == 'view_message')
|
||||
{
|
||||
$msg_id = 0;
|
||||
$folder_id = request_var('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
$folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
$action = 'view_folder';
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ class ucp_pm
|
||||
|
||||
// If new messages arrived, place them into the appropriate folder
|
||||
$num_not_moved = $num_removed = 0;
|
||||
$release = request_var('release', 0);
|
||||
$release = $request->variable('release', 0);
|
||||
|
||||
if ($user->data['user_new_privmsg'] && ($action == 'view_folder' || $action == 'view_message'))
|
||||
{
|
||||
|
@@ -44,14 +44,14 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
add_form_key('ucp_pm_compose');
|
||||
|
||||
// Grab only parameters needed here
|
||||
$to_user_id = request_var('u', 0);
|
||||
$to_group_id = request_var('g', 0);
|
||||
$msg_id = request_var('p', 0);
|
||||
$draft_id = request_var('d', 0);
|
||||
$lastclick = request_var('lastclick', 0);
|
||||
$to_user_id = $request->variable('u', 0);
|
||||
$to_group_id = $request->variable('g', 0);
|
||||
$msg_id = $request->variable('p', 0);
|
||||
$draft_id = $request->variable('d', 0);
|
||||
$lastclick = $request->variable('lastclick', 0);
|
||||
|
||||
// Reply to all triggered (quote/reply)
|
||||
$reply_to_all = request_var('reply_to_all', 0);
|
||||
$reply_to_all = $request->variable('reply_to_all', 0);
|
||||
|
||||
$address_list = $request->variable('address_list', array('' => array(0 => '')));
|
||||
|
||||
@@ -620,9 +620,9 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
// Save Draft
|
||||
if ($save && $auth->acl_get('u_savedrafts'))
|
||||
{
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
|
||||
$subject = (!$subject && $action != 'post') ? $user->lang['NEW_MESSAGE'] : $subject;
|
||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
$message = utf8_normalize_nfc($request->variable('message', '', true));
|
||||
|
||||
if ($subject && $message)
|
||||
{
|
||||
@@ -716,10 +716,10 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
{
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
$subject = utf8_normalize_nfc($request->variable('subject', '', true));
|
||||
$message_parser->message = utf8_normalize_nfc($request->variable('message', '', true));
|
||||
|
||||
$icon_id = request_var('icon', 0);
|
||||
$icon_id = $request->variable('icon', 0);
|
||||
|
||||
$enable_bbcode = (!$bbcode_status || isset($_POST['disable_bbcode'])) ? false : true;
|
||||
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true;
|
||||
@@ -907,7 +907,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
{
|
||||
if ($action == 'quotepost')
|
||||
{
|
||||
$post_id = request_var('p', 0);
|
||||
$post_id = $request->variable('p', 0);
|
||||
if ($config['allow_post_links'])
|
||||
{
|
||||
$message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}{$user->lang['COLON']} {$message_subject}[/url]\n\n";
|
||||
@@ -1224,13 +1224,13 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
|
||||
}
|
||||
|
||||
// Add Selected Groups
|
||||
$group_list = request_var('group_list', array(0));
|
||||
$group_list = $request->variable('group_list', array(0));
|
||||
|
||||
// Build usernames to add
|
||||
$usernames = request_var('username', '', true);
|
||||
$usernames = $request->variable('username', '', true);
|
||||
$usernames = (empty($usernames)) ? array() : array($usernames);
|
||||
|
||||
$username_list = request_var('username_list', '', true);
|
||||
$username_list = $request->variable('username_list', '', true);
|
||||
if ($username_list)
|
||||
{
|
||||
$usernames = array_merge($usernames, explode("\n", $username_list));
|
||||
@@ -1247,7 +1247,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
|
||||
$submit = false;
|
||||
|
||||
// Preview is only true if there was also a message entered
|
||||
if (request_var('message', ''))
|
||||
if ($request->variable('message', ''))
|
||||
{
|
||||
$preview = true;
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user, $template, $auth, $config, $db;
|
||||
global $phpbb_root_path, $phpEx, $user, $template, $auth, $config, $db, $request;
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=options");
|
||||
|
||||
@@ -37,7 +37,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
|
||||
$full_action = request_var('full_action', 0);
|
||||
$full_action = $request->variable('full_action', 0);
|
||||
|
||||
$set_folder_id = 0;
|
||||
switch ($full_action)
|
||||
@@ -47,7 +47,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$set_folder_id = request_var('full_move_to', PRIVMSGS_INBOX);
|
||||
$set_folder_id = $request->variable('full_move_to', PRIVMSGS_INBOX);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
@@ -79,7 +79,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
{
|
||||
if (check_form_key('ucp_pm_options'))
|
||||
{
|
||||
$folder_name = utf8_normalize_nfc(request_var('foldername', '', true));
|
||||
$folder_name = utf8_normalize_nfc($request->variable('foldername', '', true));
|
||||
$msg = '';
|
||||
|
||||
if ($folder_name)
|
||||
@@ -135,8 +135,8 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
{
|
||||
if (check_form_key('ucp_pm_options'))
|
||||
{
|
||||
$new_folder_name = utf8_normalize_nfc(request_var('new_folder_name', '', true));
|
||||
$rename_folder_id= request_var('rename_folder_id', 0);
|
||||
$new_folder_name = utf8_normalize_nfc($request->variable('new_folder_name', '', true));
|
||||
$rename_folder_id= $request->variable('rename_folder_id', 0);
|
||||
|
||||
if (!$new_folder_name)
|
||||
{
|
||||
@@ -178,11 +178,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
// Remove Folder
|
||||
if (isset($_POST['remove_folder']))
|
||||
{
|
||||
$remove_folder_id = request_var('remove_folder_id', 0);
|
||||
$remove_folder_id = $request->variable('remove_folder_id', 0);
|
||||
|
||||
// Default to "move all messages to inbox"
|
||||
$remove_action = request_var('remove_action', 1);
|
||||
$move_to = request_var('move_to', PRIVMSGS_INBOX);
|
||||
$remove_action = $request->variable('remove_action', 1);
|
||||
$move_to = $request->variable('move_to', PRIVMSGS_INBOX);
|
||||
|
||||
// Move to same folder?
|
||||
if ($remove_action == 1 && $remove_folder_id == $move_to)
|
||||
@@ -291,13 +291,13 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
{
|
||||
if (check_form_key('ucp_pm_options'))
|
||||
{
|
||||
$check_option = request_var('check_option', 0);
|
||||
$rule_option = request_var('rule_option', 0);
|
||||
$cond_option = request_var('cond_option', '');
|
||||
$action_option = explode('|', request_var('action_option', ''));
|
||||
$rule_string = ($cond_option != 'none') ? utf8_normalize_nfc(request_var('rule_string', '', true)) : '';
|
||||
$rule_user_id = ($cond_option != 'none') ? request_var('rule_user_id', 0) : 0;
|
||||
$rule_group_id = ($cond_option != 'none') ? request_var('rule_group_id', 0) : 0;
|
||||
$check_option = $request->variable('check_option', 0);
|
||||
$rule_option = $request->variable('rule_option', 0);
|
||||
$cond_option = $request->variable('cond_option', '');
|
||||
$action_option = explode('|', $request->variable('action_option', ''));
|
||||
$rule_string = ($cond_option != 'none') ? utf8_normalize_nfc($request->variable('rule_string', '', true)) : '';
|
||||
$rule_user_id = ($cond_option != 'none') ? $request->variable('rule_user_id', 0) : 0;
|
||||
$rule_group_id = ($cond_option != 'none') ? $request->variable('rule_group_id', 0) : 0;
|
||||
|
||||
$action = (int) $action_option[0];
|
||||
$folder_id = (int) $action_option[1];
|
||||
@@ -371,7 +371,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
// Remove Rule
|
||||
if (isset($_POST['delete_rule']) && !isset($_POST['cancel']))
|
||||
{
|
||||
$delete_id = array_keys(request_var('delete_rule', array(0 => 0)));
|
||||
$delete_id = array_keys($request->variable('delete_rule', array(0 => 0)));
|
||||
$delete_id = (!empty($delete_id[0])) ? $delete_id[0] : 0;
|
||||
|
||||
if (!$delete_id)
|
||||
@@ -514,11 +514,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
-> CHECK_* -> RULE_* [IN $global_privmsgs_rules:CHECK_*] -> [IF $rule_conditions[RULE_*] [|text|bool|user|group|own_group]] -> ACTION_*
|
||||
*/
|
||||
|
||||
$check_option = request_var('check_option', 0);
|
||||
$rule_option = request_var('rule_option', 0);
|
||||
$cond_option = request_var('cond_option', '');
|
||||
$action_option = request_var('action_option', '');
|
||||
$back = (isset($_REQUEST['back'])) ? request_var('back', array('' => 0)) : array();
|
||||
$check_option = $request->variable('check_option', 0);
|
||||
$rule_option = $request->variable('rule_option', 0);
|
||||
$cond_option = $request->variable('cond_option', '');
|
||||
$action_option = $request->variable('action_option', '');
|
||||
$back = (isset($_REQUEST['back'])) ? $request->variable('back', array('' => 0)) : array();
|
||||
|
||||
if (sizeof($back))
|
||||
{
|
||||
@@ -698,7 +698,7 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||
*/
|
||||
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
|
||||
{
|
||||
global $db, $template, $auth, $user;
|
||||
global $db, $template, $auth, $user, $request;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_COND_DEFINED' => true,
|
||||
@@ -722,7 +722,7 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
switch ($condition)
|
||||
{
|
||||
case 'text':
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_TEXT_CONDITION' => true,
|
||||
@@ -735,8 +735,8 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
break;
|
||||
|
||||
case 'user':
|
||||
$rule_user_id = request_var('rule_user_id', 0);
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
$rule_user_id = $request->variable('rule_user_id', 0);
|
||||
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
|
||||
|
||||
if ($rule_string && !$rule_user_id)
|
||||
{
|
||||
@@ -778,8 +778,8 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
|
||||
break;
|
||||
|
||||
case 'group':
|
||||
$rule_group_id = request_var('rule_group_id', 0);
|
||||
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
|
||||
$rule_group_id = $request->variable('rule_group_id', 0);
|
||||
$rule_string = utf8_normalize_nfc($request->variable('rule_string', '', true));
|
||||
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g ';
|
||||
|
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function view_folder($id, $mode, $folder_id, $folder)
|
||||
{
|
||||
global $user, $template, $auth, $db, $cache;
|
||||
global $user, $template, $auth, $db, $cache, $request;
|
||||
global $phpbb_root_path, $config, $phpEx;
|
||||
|
||||
$submit_export = (isset($_POST['submit_export'])) ? true : false;
|
||||
@@ -196,9 +196,9 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
}
|
||||
else
|
||||
{
|
||||
$export_type = request_var('export_option', '');
|
||||
$enclosure = request_var('enclosure', '');
|
||||
$delimiter = request_var('delimiter', '');
|
||||
$export_type = $request->variable('export_option', '');
|
||||
$enclosure = $request->variable('enclosure', '');
|
||||
$delimiter = $request->variable('delimiter', '');
|
||||
|
||||
if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
|
||||
{
|
||||
@@ -397,14 +397,14 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
*/
|
||||
function get_pm_from($folder_id, $folder, $user_id)
|
||||
{
|
||||
global $user, $db, $template, $config, $auth, $phpbb_container, $phpbb_root_path, $phpEx;
|
||||
global $user, $db, $template, $config, $auth, $phpbb_container, $phpbb_root_path, $phpEx, $request;
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
|
||||
// Additional vars later, pm ordering is mostly different from post ordering. :/
|
||||
$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');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
@@ -32,7 +32,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
$msg_id = (int) $msg_id;
|
||||
$folder_id = (int) $folder_id;
|
||||
$author_id = (int) $message_row['author_id'];
|
||||
$view = request_var('view', '');
|
||||
$view = $request->variable('view', '');
|
||||
|
||||
// Not able to view message, it was deleted by the sender
|
||||
if ($message_row['pm_deleted'])
|
||||
|
@@ -29,7 +29,7 @@ class ucp_prefs
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
|
||||
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $request;
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$error = $data = array();
|
||||
@@ -40,16 +40,16 @@ class ucp_prefs
|
||||
case 'personal':
|
||||
add_form_key('ucp_prefs_personal');
|
||||
$data = array(
|
||||
'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']),
|
||||
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
|
||||
'lang' => basename(request_var('lang', $user->data['user_lang'])),
|
||||
'user_style' => request_var('user_style', (int) $user->data['user_style']),
|
||||
'tz' => request_var('tz', $user->data['user_timezone']),
|
||||
'notifymethod' => $request->variable('notifymethod', $user->data['user_notify_type']),
|
||||
'dateformat' => $request->variable('dateformat', $user->data['user_dateformat'], true),
|
||||
'lang' => basename($request->variable('lang', $user->data['user_lang'])),
|
||||
'user_style' => $request->variable('user_style', (int) $user->data['user_style']),
|
||||
'tz' => $request->variable('tz', $user->data['user_timezone']),
|
||||
|
||||
'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']),
|
||||
'massemail' => request_var('massemail', (bool) $user->data['user_allow_massemail']),
|
||||
'hideonline' => request_var('hideonline', (bool) !$user->data['user_allow_viewonline']),
|
||||
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
|
||||
'viewemail' => $request->variable('viewemail', (bool) $user->data['user_allow_viewemail']),
|
||||
'massemail' => $request->variable('massemail', (bool) $user->data['user_allow_massemail']),
|
||||
'hideonline' => $request->variable('hideonline', (bool) !$user->data['user_allow_viewonline']),
|
||||
'allowpm' => $request->variable('allowpm', (bool) $user->data['user_allow_pm']),
|
||||
);
|
||||
|
||||
if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
|
||||
@@ -221,20 +221,20 @@ class ucp_prefs
|
||||
add_form_key('ucp_prefs_view');
|
||||
|
||||
$data = array(
|
||||
'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'),
|
||||
'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'),
|
||||
'topic_st' => request_var('topic_st', (!empty($user->data['user_topic_show_days'])) ? (int) $user->data['user_topic_show_days'] : 0),
|
||||
'topic_sk' => $request->variable('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'),
|
||||
'topic_sd' => $request->variable('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'),
|
||||
'topic_st' => $request->variable('topic_st', (!empty($user->data['user_topic_show_days'])) ? (int) $user->data['user_topic_show_days'] : 0),
|
||||
|
||||
'post_sk' => request_var('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'),
|
||||
'post_sd' => request_var('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'),
|
||||
'post_st' => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? (int) $user->data['user_post_show_days'] : 0),
|
||||
'post_sk' => $request->variable('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'),
|
||||
'post_sd' => $request->variable('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'),
|
||||
'post_st' => $request->variable('post_st', (!empty($user->data['user_post_show_days'])) ? (int) $user->data['user_post_show_days'] : 0),
|
||||
|
||||
'images' => request_var('images', (bool) $user->optionget('viewimg')),
|
||||
'flash' => request_var('flash', (bool) $user->optionget('viewflash')),
|
||||
'smilies' => request_var('smilies', (bool) $user->optionget('viewsmilies')),
|
||||
'sigs' => request_var('sigs', (bool) $user->optionget('viewsigs')),
|
||||
'avatars' => request_var('avatars', (bool) $user->optionget('viewavatars')),
|
||||
'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')),
|
||||
'images' => $request->variable('images', (bool) $user->optionget('viewimg')),
|
||||
'flash' => $request->variable('flash', (bool) $user->optionget('viewflash')),
|
||||
'smilies' => $request->variable('smilies', (bool) $user->optionget('viewsmilies')),
|
||||
'sigs' => $request->variable('sigs', (bool) $user->optionget('viewsigs')),
|
||||
'avatars' => $request->variable('avatars', (bool) $user->optionget('viewavatars')),
|
||||
'wordcensor' => $request->variable('wordcensor', (bool) $user->optionget('viewcensors')),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -393,10 +393,10 @@ class ucp_prefs
|
||||
case 'post':
|
||||
|
||||
$data = array(
|
||||
'bbcode' => request_var('bbcode', $user->optionget('bbcode')),
|
||||
'smilies' => request_var('smilies', $user->optionget('smilies')),
|
||||
'sig' => request_var('sig', $user->optionget('attachsig')),
|
||||
'notify' => request_var('notify', (bool) $user->data['user_notify']),
|
||||
'bbcode' => $request->variable('bbcode', $user->optionget('bbcode')),
|
||||
'smilies' => $request->variable('smilies', $user->optionget('smilies')),
|
||||
'sig' => $request->variable('sig', $user->optionget('attachsig')),
|
||||
'notify' => $request->variable('notify', (bool) $user->data['user_notify']),
|
||||
);
|
||||
add_form_key('ucp_prefs_post');
|
||||
|
||||
|
@@ -46,8 +46,8 @@ class ucp_profile
|
||||
case 'reg_details':
|
||||
|
||||
$data = array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', $user->data['username'], true)),
|
||||
'email' => strtolower(request_var('email', $user->data['user_email'])),
|
||||
'username' => utf8_normalize_nfc($request->variable('username', $user->data['username'], true)),
|
||||
'email' => strtolower($request->variable('email', $user->data['user_email'])),
|
||||
'new_password' => $request->variable('new_password', '', true),
|
||||
'cur_password' => $request->variable('cur_password', '', true),
|
||||
'password_confirm' => $request->variable('password_confirm', '', true),
|
||||
@@ -302,7 +302,7 @@ class ucp_profile
|
||||
$cp_data = $cp_error = array();
|
||||
|
||||
$data = array(
|
||||
'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
|
||||
'jabber' => utf8_normalize_nfc($request->variable('jabber', $user->data['user_jabber'], true)),
|
||||
);
|
||||
|
||||
if ($config['allow_birthdays'])
|
||||
@@ -314,9 +314,9 @@ class ucp_profile
|
||||
list($data['bday_day'], $data['bday_month'], $data['bday_year']) = explode('-', $user->data['user_birthday']);
|
||||
}
|
||||
|
||||
$data['bday_day'] = request_var('bday_day', $data['bday_day']);
|
||||
$data['bday_month'] = request_var('bday_month', $data['bday_month']);
|
||||
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
|
||||
$data['bday_day'] = $request->variable('bday_day', $data['bday_day']);
|
||||
$data['bday_month'] = $request->variable('bday_month', $data['bday_month']);
|
||||
$data['bday_year'] = $request->variable('bday_year', $data['bday_year']);
|
||||
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
|
||||
}
|
||||
|
||||
@@ -697,7 +697,7 @@ class ucp_profile
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$keys = request_var('keys', array(''));
|
||||
$keys = $request->variable('keys', array(''));
|
||||
|
||||
if (!check_form_key('ucp_autologin_keys'))
|
||||
{
|
||||
|
@@ -42,8 +42,8 @@ class ucp_register
|
||||
$coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false;
|
||||
$agreed = $request->variable('agreed', false);
|
||||
$submit = $request->is_set_post('submit');
|
||||
$change_lang = request_var('change_lang', '');
|
||||
$user_lang = request_var('lang', $user->lang_name);
|
||||
$change_lang = $request->variable('change_lang', '');
|
||||
$user_lang = $request->variable('lang', $user->lang_name);
|
||||
|
||||
if ($agreed)
|
||||
{
|
||||
@@ -115,10 +115,10 @@ class ucp_register
|
||||
{
|
||||
// We do not include the password
|
||||
$s_hidden_fields = array_merge($s_hidden_fields, array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', '', true)),
|
||||
'email' => strtolower(request_var('email', '')),
|
||||
'username' => utf8_normalize_nfc($request->variable('username', '', true)),
|
||||
'email' => strtolower($request->variable('email', '')),
|
||||
'lang' => $user->lang_name,
|
||||
'tz' => request_var('tz', $config['board_timezone']),
|
||||
'tz' => $request->variable('tz', $config['board_timezone']),
|
||||
));
|
||||
|
||||
}
|
||||
@@ -192,12 +192,12 @@ class ucp_register
|
||||
$timezone = $config['board_timezone'];
|
||||
|
||||
$data = array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', '', true)),
|
||||
'username' => utf8_normalize_nfc($request->variable('username', '', true)),
|
||||
'new_password' => $request->variable('new_password', '', true),
|
||||
'password_confirm' => $request->variable('password_confirm', '', true),
|
||||
'email' => strtolower(request_var('email', '')),
|
||||
'lang' => basename(request_var('lang', $user->lang_name)),
|
||||
'tz' => request_var('tz', $timezone),
|
||||
'email' => strtolower($request->variable('email', '')),
|
||||
'lang' => basename($request->variable('lang', $user->lang_name)),
|
||||
'tz' => $request->variable('tz', $timezone),
|
||||
);
|
||||
|
||||
// Check and initialize some variables if needed
|
||||
|
@@ -29,7 +29,7 @@ class ucp_remind
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
global $db, $user, $auth, $template, $phpbb_container;
|
||||
|
||||
if (!$config['allow_password_reset'])
|
||||
@@ -37,8 +37,8 @@ class ucp_remind
|
||||
trigger_error($user->lang('UCP_PASSWORD_RESET_DISABLED', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'));
|
||||
}
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$username = $request->variable('username', '', true);
|
||||
$email = strtolower($request->variable('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($submit)
|
||||
|
@@ -30,10 +30,10 @@ class ucp_resend
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $db, $user, $auth, $template;
|
||||
global $db, $user, $auth, $template, $request;
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$username = $request->variable('username', '', true);
|
||||
$email = strtolower($request->variable('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
add_form_key('ucp_resend');
|
||||
|
@@ -44,7 +44,7 @@ class ucp_zebra
|
||||
|
||||
foreach ($var_ary as $var => $default)
|
||||
{
|
||||
$data[$var] = request_var($var, $default, true);
|
||||
$data[$var] = $request->variable($var, $default, true);
|
||||
}
|
||||
|
||||
if (!empty($data['add']) || sizeof($data['usernames']))
|
||||
|
Reference in New Issue
Block a user