mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/13454] Remove unused variables
This is the first part of the changes. More to come. PHPBB3-13454
This commit is contained in:
@@ -30,7 +30,7 @@ class ucp_activate
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
global $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||
global $db, $user, $auth, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||
|
||||
$user_id = $request->variable('u', 0);
|
||||
$key = $request->variable('k', '');
|
||||
|
@@ -36,7 +36,6 @@ class ucp_attachments
|
||||
$sort_dir = $request->variable('sd', 'a');
|
||||
|
||||
$delete = (isset($_POST['delete'])) ? true : false;
|
||||
$confirm = (isset($_POST['confirm'])) ? true : false;
|
||||
$delete_ids = array_keys($request->variable('attachment', array(0)));
|
||||
|
||||
if ($delete && sizeof($delete_ids))
|
||||
|
@@ -36,7 +36,7 @@ class ucp_confirm
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container, $request;
|
||||
global $config, $phpbb_container, $request;
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init($request->variable('type', 0));
|
||||
|
@@ -38,8 +38,6 @@ class ucp_groups
|
||||
|
||||
$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();
|
||||
|
||||
/** @var \phpbb\group\helper $group_helper */
|
||||
$group_helper = $phpbb_container->get('group_helper');
|
||||
@@ -462,11 +460,8 @@ class ucp_groups
|
||||
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
|
||||
$user->add_lang(array('acp/groups', 'acp/common'));
|
||||
|
||||
$data = $submit_ary = array();
|
||||
|
||||
$update = (isset($_POST['update'])) ? true : false;
|
||||
|
||||
$error = array();
|
||||
|
@@ -99,7 +99,7 @@ class ucp_login_link
|
||||
else
|
||||
{
|
||||
// Finish login
|
||||
$result = $user->session_create($login_result['user_row']['user_id'], false, false, true);
|
||||
$user->session_create($login_result['user_row']['user_id'], false, false, true);
|
||||
|
||||
// Perform a redirect as the account has been linked
|
||||
$this->perform_redirect();
|
||||
|
@@ -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, $request;
|
||||
global $phpbb_root_path, $phpEx, $user, $template, $config, $db, $request;
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=options");
|
||||
|
||||
@@ -80,7 +80,6 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
||||
if (check_form_key('ucp_pm_options'))
|
||||
{
|
||||
$folder_name = $request->variable('foldername', '', true);
|
||||
$msg = '';
|
||||
|
||||
if ($folder_name)
|
||||
{
|
||||
|
@@ -41,9 +41,6 @@ function view_folder($id, $mode, $folder_id, $folder)
|
||||
|
||||
$color_rows = array('marked', 'replied');
|
||||
|
||||
// only show the friend/foe color rows if the module is enabled
|
||||
$zebra_enabled = false;
|
||||
|
||||
$_module = new p_master();
|
||||
$_module->list_modules('ucp');
|
||||
$_module->set_active('zebra');
|
||||
|
@@ -51,7 +51,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
}
|
||||
|
||||
// Grab icons
|
||||
$icons = $cache->obtain_icons();
|
||||
$cache->obtain_icons();
|
||||
|
||||
// Load the custom profile fields
|
||||
if ($config['load_cpf_pm'])
|
||||
|
@@ -29,7 +29,7 @@ class ucp_prefs
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $request;
|
||||
global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $request;
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$error = $data = array();
|
||||
|
@@ -31,13 +31,12 @@ class ucp_profile
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang('posting');
|
||||
|
||||
$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();
|
||||
$s_hidden_fields = '';
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class ucp_register
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||
global $config, $db, $user, $template, $phpbb_root_path, $phpEx;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
//
|
||||
|
@@ -30,7 +30,7 @@ class ucp_remind
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
global $db, $user, $auth, $template, $phpbb_container;
|
||||
global $db, $user, $template, $phpbb_container;
|
||||
|
||||
if (!$config['allow_password_reset'])
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@ class ucp_zebra
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
||||
global $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
||||
|
||||
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
|
||||
$s_hidden_fields = '';
|
||||
|
Reference in New Issue
Block a user