mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 20:32:11 +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:
parent
d0adbe94d5
commit
73e6e5b77f
@ -143,7 +143,7 @@ function filldb($newposts)
|
||||
if ((rand(0,30) < 1) || ($forum_topic_count[$forum] == 0))
|
||||
{
|
||||
// create a new topic 1 in 30 times (or when there are none);
|
||||
$topic = make_topic($userid, "Testing topic $i", $forum);
|
||||
make_topic($userid, "Testing topic $i", $forum);
|
||||
$forum_topic_count[$forum]++;
|
||||
}
|
||||
else
|
||||
|
@ -19,7 +19,7 @@ if (!headers_sent())
|
||||
function unicode_to_utf8($string)
|
||||
{
|
||||
$utf8 = '';
|
||||
$chars = array();
|
||||
|
||||
for ($i = 0; $i < strlen($string); $i++)
|
||||
{
|
||||
if (isset($string[$i + 5]) && substr($string, $i, 2) == '\\u' && ctype_xdigit(substr($string, $i + 2, 4)))
|
||||
|
@ -25,8 +25,8 @@ class acp_bbcodes
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
|
||||
global $db, $user, $template, $cache, $request, $phpbb_dispatcher, $phpbb_container;
|
||||
global $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
|
@ -30,13 +30,12 @@ class acp_board
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $cache, $phpbb_container, $phpbb_dispatcher, $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$action = $request->variable('action', '');
|
||||
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
|
||||
|
||||
$form_key = 'acp_board';
|
||||
|
@ -25,8 +25,8 @@ class acp_bots
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache, $request, $phpbb_log;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $config, $db, $user, $template, $cache, $request, $phpbb_log;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$action = $request->variable('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
@ -25,8 +25,8 @@ class acp_captcha
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $user, $auth, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
|
||||
global $user, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_container;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
|
@ -37,7 +37,6 @@ class acp_database
|
||||
$this->page_title = 'ACP_DATABASE';
|
||||
|
||||
$action = $request->variable('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MODE' => $mode
|
||||
|
@ -25,8 +25,7 @@ class acp_disallow
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
||||
global $config, $phpbb_admin_path;
|
||||
global $db, $user, $template, $cache, $phpbb_log, $request;;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
|
@ -25,8 +25,8 @@ class acp_email
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $phpbb_dispatcher;
|
||||
global $config, $db, $user, $template, $phpbb_log, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang('acp/email');
|
||||
$this->tpl_name = 'acp_email';
|
||||
|
@ -34,7 +34,7 @@ class acp_extensions
|
||||
function main()
|
||||
{
|
||||
// Start the page
|
||||
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx, $phpbb_log, $cache;
|
||||
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache;
|
||||
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
|
@ -27,7 +27,7 @@ class acp_forums
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
|
||||
global $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/forums');
|
||||
$this->tpl_name = 'acp_forums';
|
||||
|
@ -26,7 +26,7 @@ class acp_groups
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang('acp/groups');
|
||||
|
@ -28,8 +28,8 @@ class acp_icons
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $template, $cache;
|
||||
global $config, $phpbb_root_path;
|
||||
global $request, $phpbb_container;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
@ -32,7 +32,7 @@ class acp_inactive
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
if (!function_exists('user_active_flip'))
|
||||
{
|
||||
|
@ -29,8 +29,8 @@ class acp_jabber
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
@ -39,7 +39,6 @@ class acp_jabber
|
||||
include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||
}
|
||||
|
||||
$action = $request->variable('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($mode != 'settings')
|
||||
@ -68,8 +67,6 @@ class acp_jabber
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$error = array();
|
||||
|
||||
$message = $user->lang['JAB_SETTINGS_CHANGED'];
|
||||
$log = 'JAB_SETTINGS_CHANGED';
|
||||
|
||||
|
@ -25,8 +25,8 @@ class acp_logs
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $user, $auth, $template, $phpbb_container;
|
||||
global $config;
|
||||
global $request;
|
||||
|
||||
$user->add_lang('mcp');
|
||||
@ -34,7 +34,6 @@ class acp_logs
|
||||
// Set up general vars
|
||||
$action = $request->variable('action', '');
|
||||
$forum_id = $request->variable('f', 0);
|
||||
$topic_id = $request->variable('t', 0);
|
||||
$start = $request->variable('start', 0);
|
||||
$deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
|
||||
$deleteall = $request->variable('delall', false, false, \phpbb\request\request_interface::POST);
|
||||
|
@ -26,8 +26,8 @@ class acp_permission_roles
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $template, $phpbb_container;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
global $request, $phpbb_log;
|
||||
|
||||
if (!function_exists('user_get_id_name'))
|
||||
|
@ -31,8 +31,8 @@ class acp_permissions
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $auth, $template, $phpbb_container, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
@ -167,8 +167,6 @@ class acp_permissions
|
||||
}
|
||||
|
||||
// Define some common variables for every mode
|
||||
$error = array();
|
||||
|
||||
$permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local';
|
||||
|
||||
// Showing introductionary page?
|
||||
|
@ -25,8 +25,7 @@ class acp_php_info
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $template;
|
||||
|
||||
if ($mode != 'info')
|
||||
{
|
||||
|
@ -33,8 +33,8 @@ class acp_profile
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $config, $db, $user, $template;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
global $request, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||
|
||||
if (!function_exists('generate_smilies'))
|
||||
@ -55,7 +55,6 @@ class acp_profile
|
||||
$action = (isset($_POST['create'])) ? 'create' : $request->variable('action', '');
|
||||
|
||||
$error = array();
|
||||
$s_hidden_fields = '';
|
||||
|
||||
if (!$field_id && in_array($action, array('delete','activate', 'deactivate', 'move_up', 'move_down', 'edit')))
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ class acp_prune
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
||||
global $user, $phpEx, $phpbb_root_path;
|
||||
|
||||
$user->add_lang('acp/prune');
|
||||
|
||||
@ -55,8 +55,7 @@ class acp_prune
|
||||
*/
|
||||
function prune_forums($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||
|
||||
$all_forums = $request->variable('all_forums', 0);
|
||||
$forum_id = $request->variable('f', array(0));
|
||||
|
@ -25,8 +25,8 @@ class acp_ranks
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
|
||||
global $db, $user, $template, $cache, $request, $phpbb_dispatcher;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
@ -162,7 +162,7 @@ class acp_ranks
|
||||
case 'edit':
|
||||
case 'add':
|
||||
|
||||
$data = $ranks = $existing_imgs = array();
|
||||
$ranks = $existing_imgs = array();
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
|
@ -25,8 +25,7 @@ class acp_reasons
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $template;
|
||||
global $request, $phpbb_log;
|
||||
|
||||
$user->add_lang(array('mcp', 'acp/posting'));
|
||||
|
@ -50,8 +50,8 @@ class acp_search
|
||||
|
||||
function settings($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $user, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
|
@ -31,8 +31,8 @@ class acp_users
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
|
||||
global $config, $db, $user, $auth, $template;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $phpbb_dispatcher, $request;
|
||||
global $phpbb_container, $phpbb_log;
|
||||
|
||||
|
@ -28,8 +28,7 @@ class acp_words
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_log, $request, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $user, $template, $cache, $phpbb_log, $request, $phpbb_container;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
|
@ -140,7 +140,7 @@ class bbcode
|
||||
*/
|
||||
function bbcode_cache_init()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper, $phpbb_container, $phpbb_filesystem;
|
||||
global $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
|
||||
|
||||
if (empty($this->template_filename))
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function adm_page_header($page_title)
|
||||
{
|
||||
global $config, $db, $user, $template;
|
||||
global $config, $user, $template;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
@ -140,8 +140,8 @@ function adm_page_header($page_title)
|
||||
*/
|
||||
function adm_page_footer($copyright_html = true)
|
||||
{
|
||||
global $db, $config, $template, $user, $auth, $cache;
|
||||
global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $db, $config, $template, $user, $auth;
|
||||
global $phpbb_root_path;
|
||||
global $request, $phpbb_dispatcher;
|
||||
|
||||
// A listener can set this variable to `true` when it overrides this function
|
||||
|
@ -65,7 +65,7 @@ function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = ar
|
||||
*/
|
||||
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
global $db, $auth;
|
||||
|
||||
// This query is identical to the jumpbox one
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||
|
@ -56,7 +56,6 @@ class compress
|
||||
// Clean up path, add closing / if not present
|
||||
$src_path = ($src_path && substr($src_path, -1) != '/') ? $src_path . '/' : $src_path;
|
||||
|
||||
$filelist = array();
|
||||
$filelist = filelist("$phpbb_root_path$src", '', '*');
|
||||
krsort($filelist);
|
||||
|
||||
|
@ -30,7 +30,6 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
|
||||
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
|
||||
$parent_id = $visible_forums = 0;
|
||||
$sql_from = '';
|
||||
|
||||
// Mark forums read?
|
||||
$mark_read = $request->variable('mark', '');
|
||||
|
@ -123,7 +123,7 @@ function wrap_img_in_html($src, $title)
|
||||
*/
|
||||
function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
{
|
||||
global $user, $db, $config, $phpbb_root_path, $request;
|
||||
global $user, $db, $phpbb_root_path, $request;
|
||||
|
||||
$filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
|
||||
|
||||
|
@ -82,8 +82,8 @@ class p_master
|
||||
*/
|
||||
function list_modules($p_class)
|
||||
{
|
||||
global $auth, $db, $user, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
global $db, $user, $cache;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
// Sanitise for future path use, it's escaped as appropriate for queries
|
||||
$this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class));
|
||||
|
@ -166,7 +166,7 @@ function user_update_name($old_name, $new_name)
|
||||
*/
|
||||
function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
{
|
||||
global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
|
||||
global $db, $config;
|
||||
global $phpbb_dispatcher, $phpbb_container;
|
||||
|
||||
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
|
||||
|
@ -24,7 +24,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
function mcp_front_view($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
global $template, $db, $user, $auth, $module;
|
||||
global $phpbb_dispatcher, $request;
|
||||
|
||||
|
@ -36,7 +36,7 @@ class mcp_logs
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_log;
|
||||
global $config, $phpbb_container, $phpbb_log;
|
||||
|
||||
$user->add_lang('acp/common');
|
||||
|
||||
|
@ -35,8 +35,8 @@ class mcp_main
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $action;
|
||||
global $config, $phpbb_root_path, $phpEx, $request;
|
||||
global $auth, $user, $action;
|
||||
global $phpbb_root_path, $phpEx, $request;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$quickmod = ($mode == 'quickmod') ? true : false;
|
||||
|
@ -35,8 +35,8 @@ class mcp_notes
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $user, $template, $request;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$action = $request->variable('action', array('' => ''));
|
||||
|
||||
@ -74,7 +74,7 @@ class mcp_notes
|
||||
*/
|
||||
function mcp_notes_user_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_log, $request;
|
||||
global $config, $phpbb_log, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_container;
|
||||
|
||||
$user_id = $request->variable('u', 0);
|
||||
|
@ -35,7 +35,7 @@ class mcp_pm_reports
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $cache, $request;
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
@ -128,7 +128,6 @@ function mcp_post_details($id, $mode, $action)
|
||||
$users_ary = $usernames_ary = array();
|
||||
$attachments = $extensions = array();
|
||||
$post_id = $post_info['post_id'];
|
||||
$topic_tracking_info = array();
|
||||
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
@ -150,8 +149,6 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE post_msg_id = ' . $post_id . '
|
||||
|
@ -35,7 +35,7 @@ class mcp_reports
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $cache, $request;
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
@ -156,8 +156,6 @@ function mcp_topic_view($id, $mode, $action)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$topic_tracking_info = array();
|
||||
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
{
|
||||
|
@ -35,8 +35,7 @@ class mcp_warn
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template, $request;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $request;
|
||||
|
||||
$action = $request->variable('action', array('' => ''));
|
||||
|
||||
@ -78,8 +77,8 @@ class mcp_warn
|
||||
*/
|
||||
function mcp_warn_front_view()
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $template, $db, $user, $auth;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
global $template, $db, $user;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username&select_single=true'),
|
||||
@ -132,7 +131,7 @@ class mcp_warn
|
||||
function mcp_warn_list_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_container;
|
||||
global $template, $db, $user, $auth, $request;
|
||||
global $template, $user, $auth, $request;
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
@ -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 = '';
|
||||
|
@ -54,7 +54,7 @@ function phpbb_forum_flags()
|
||||
*/
|
||||
function phpbb_insert_forums()
|
||||
{
|
||||
global $db, $src_db, $same_db, $convert, $user, $config;
|
||||
global $db, $src_db, $same_db, $convert, $user;
|
||||
|
||||
$db->sql_query($convert->truncate_statement . FORUMS_TABLE);
|
||||
|
||||
|
@ -97,13 +97,12 @@ class gd
|
||||
|
||||
if ($config['captcha_gd_3d_noise'])
|
||||
{
|
||||
$xoffset = mt_rand(0,9);
|
||||
$noise_bitmaps = $this->captcha_noise_bg_bitmaps();
|
||||
for ($i = 0; $i < $code_len; ++$i)
|
||||
{
|
||||
$noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, sizeof($noise_bitmaps['data'])));
|
||||
|
||||
list($min, $max) = $noise[$i]->range();
|
||||
$noise[$i]->range();
|
||||
//$box = $noise[$i]->dimensions($sizes[$i]);
|
||||
}
|
||||
$xoffset = 0;
|
||||
@ -151,8 +150,6 @@ class gd
|
||||
*/
|
||||
function wave($img)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$period_x = mt_rand(12,18);
|
||||
$period_y = mt_rand(7,14);
|
||||
$amp_x = mt_rand(5,10);
|
||||
|
@ -23,8 +23,6 @@ class gd_wave
|
||||
|
||||
function execute($code, $seed)
|
||||
{
|
||||
global $starttime;
|
||||
|
||||
// seed the random generator
|
||||
mt_srand($seed);
|
||||
|
||||
@ -77,7 +75,6 @@ class gd_wave
|
||||
// TODO
|
||||
$background = imagecolorallocate($img, mt_rand(155, 255), mt_rand(155, 255), mt_rand(155, 255));
|
||||
imagefill($img, 0, 0, $background);
|
||||
$black = imagecolorallocate($img, 0, 0, 0);
|
||||
|
||||
$random = array();
|
||||
$fontcolors = array();
|
||||
@ -155,7 +152,7 @@ class gd_wave
|
||||
// rather than recalculating from absolute coordinates
|
||||
// What we cache into the $img_buffer contains the raised text coordinates.
|
||||
$img_pos_prev = $img_buffer[0][0] = array($box['upper_left']['x'], $box['upper_left']['y']);
|
||||
$cur_height = $prev_height = $this->wave_height(0, 0, $subdivision_factor);
|
||||
$prev_height = $this->wave_height(0, 0, $subdivision_factor);
|
||||
$full_x = $plane_x * $subdivision_factor;
|
||||
$full_y = $plane_y * $subdivision_factor;
|
||||
|
||||
|
@ -34,7 +34,7 @@ abstract class captcha_abstract
|
||||
|
||||
function init($type)
|
||||
{
|
||||
global $config, $db, $user, $request;
|
||||
global $config, $request;
|
||||
|
||||
// read input
|
||||
$this->confirm_id = $request->variable('confirm_id', '');
|
||||
@ -56,8 +56,6 @@ abstract class captcha_abstract
|
||||
|
||||
function execute_demo()
|
||||
{
|
||||
global $user;
|
||||
|
||||
$this->code = gen_rand_string_friendly(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS));
|
||||
$this->seed = hexdec(substr(unique_id(), 4, 10));
|
||||
|
||||
@ -117,7 +115,7 @@ abstract class captcha_abstract
|
||||
|
||||
function get_demo_template($id)
|
||||
{
|
||||
global $config, $user, $template, $request, $phpbb_admin_path, $phpEx;
|
||||
global $config, $template, $request, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$variables = '';
|
||||
|
||||
@ -153,7 +151,7 @@ abstract class captcha_abstract
|
||||
|
||||
function garbage_collect($type)
|
||||
{
|
||||
global $db, $config;
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT DISTINCT c.session_id
|
||||
FROM ' . CONFIRM_TABLE . ' c
|
||||
|
@ -53,18 +53,11 @@ class gd extends captcha_abstract
|
||||
|
||||
function acp_page($id, &$module)
|
||||
{
|
||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $user, $template, $phpbb_log, $request;
|
||||
global $config;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
$config_vars = array(
|
||||
'enable_confirm' => 'REG_ENABLE',
|
||||
'enable_post_confirm' => 'POST_ENABLE',
|
||||
'confirm_refresh' => 'CONFIRM_REFRESH',
|
||||
'captcha_gd' => 'CAPTCHA_GD',
|
||||
);
|
||||
|
||||
$module->tpl_name = 'captcha_gd_acp';
|
||||
$module->page_title = 'ACP_VC_SETTINGS';
|
||||
$form_key = 'acp_captcha';
|
||||
|
@ -35,7 +35,7 @@ class gd_wave extends captcha_abstract
|
||||
|
||||
function acp_page($id, &$module)
|
||||
{
|
||||
global $config, $db, $template, $user;
|
||||
global $user;
|
||||
|
||||
trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
|
||||
}
|
||||
|
@ -84,8 +84,6 @@ class oracle extends \phpbb\db\driver\driver
|
||||
* but I assume its because the Oracle extension provides a direct method to access it
|
||||
* without a query.
|
||||
*/
|
||||
|
||||
$use_cache = false;
|
||||
/*
|
||||
global $cache;
|
||||
|
||||
|
@ -118,7 +118,7 @@ class release_3_0_5_rc1 extends container_aware_migration
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
// Skip first row, this is our original auth option we want to preserve
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_fetchrow($result);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
|
@ -45,7 +45,6 @@ class update_custom_bbcodes_with_idn extends \phpbb\db\migration\migration
|
||||
$sql_ary = array();
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$data = array();
|
||||
if (preg_match('/(URL|LOCAL_URL|RELATIVE_URL)/', $row['bbcode_match']))
|
||||
{
|
||||
$data = $bbcodes->build_regexp($row['bbcode_match'], $row['bbcode_tpl']);
|
||||
|
@ -97,7 +97,6 @@ class remote extends base
|
||||
|
||||
$url['path'] = implode('', $url['path']);
|
||||
$upload_ary['name'] = utf8_basename($url['path']) . (($ext) ? '.' . $ext : '');
|
||||
$filename = $url['path'];
|
||||
$filesize = 0;
|
||||
|
||||
$remote_max_filesize = $this->get_max_file_size();
|
||||
|
@ -117,7 +117,7 @@ class validate extends \phpbb\console\command\command
|
||||
|
||||
try
|
||||
{
|
||||
$config = $processor->processConfiguration($configuration, $config);
|
||||
$processor->processConfiguration($configuration, $config);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
@ -19,7 +19,6 @@ use phpbb\install\helper\navigation\navigation_provider;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use phpbb\install\helper\iohandler\factory;
|
||||
use phpbb\install\controller\helper;
|
||||
use phpbb\template\template;
|
||||
use phpbb\request\request_interface;
|
||||
use phpbb\install\installer;
|
||||
|
@ -66,7 +66,7 @@ class report_handler_post extends report_handler
|
||||
'reported_post_enable_magic_url' => $this->report_data['enable_magic_url'],
|
||||
);
|
||||
|
||||
$report_id = $this->create_report($report_data);
|
||||
$this->create_report($report_data);
|
||||
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_reported = 1
|
||||
|
@ -28,8 +28,6 @@ class includejs extends \phpbb\template\twig\node\includeasset
|
||||
*/
|
||||
protected function append_asset(\Twig_Compiler $compiler)
|
||||
{
|
||||
$config = $this->environment->get_phpbb_config();
|
||||
|
||||
$compiler
|
||||
->raw("<script type=\"text/javascript\" src=\"' . ")
|
||||
->raw("\$asset_file")
|
||||
|
@ -50,7 +50,6 @@ class parser implements \phpbb\textformatter\parser_interface
|
||||
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->parser = $parser;
|
||||
$parser = $this;
|
||||
|
||||
/**
|
||||
* Configure the parser service
|
||||
@ -73,8 +72,6 @@ class parser implements \phpbb\textformatter\parser_interface
|
||||
*/
|
||||
public function parse($text)
|
||||
{
|
||||
$parser = $this;
|
||||
|
||||
/**
|
||||
* Modify a text before it is parsed
|
||||
*
|
||||
|
@ -104,7 +104,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||
}
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->renderer = $renderer;
|
||||
$renderer = $this;
|
||||
|
||||
/**
|
||||
* Configure the renderer service
|
||||
|
Loading…
x
Reference in New Issue
Block a user