aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-12-03 17:50:29 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-01-06 13:51:19 +0100
commit73e6e5b77faadbb7676961bf38122d669de111db (patch)
treef35a54eacd94d3c947074fe5cd21b407ef997b24
parentd0adbe94d53cd5997e8ab66ec3788240669826ff (diff)
downloadforums-73e6e5b77faadbb7676961bf38122d669de111db.tar
forums-73e6e5b77faadbb7676961bf38122d669de111db.tar.gz
forums-73e6e5b77faadbb7676961bf38122d669de111db.tar.bz2
forums-73e6e5b77faadbb7676961bf38122d669de111db.tar.xz
forums-73e6e5b77faadbb7676961bf38122d669de111db.zip
[ticket/13454] Remove unused variables
This is the first part of the changes. More to come. PHPBB3-13454
-rw-r--r--phpBB/develop/benchmark.php2
-rw-r--r--phpBB/develop/unicode_testing.php2
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php4
-rw-r--r--phpBB/includes/acp/acp_board.php5
-rw-r--r--phpBB/includes/acp/acp_bots.php4
-rw-r--r--phpBB/includes/acp/acp_captcha.php4
-rw-r--r--phpBB/includes/acp/acp_database.php1
-rw-r--r--phpBB/includes/acp/acp_disallow.php3
-rw-r--r--phpBB/includes/acp/acp_email.php4
-rw-r--r--phpBB/includes/acp/acp_extensions.php2
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/acp/acp_groups.php2
-rw-r--r--phpBB/includes/acp/acp_icons.php4
-rw-r--r--phpBB/includes/acp/acp_inactive.php2
-rw-r--r--phpBB/includes/acp/acp_jabber.php7
-rw-r--r--phpBB/includes/acp/acp_logs.php5
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php4
-rw-r--r--phpBB/includes/acp/acp_permissions.php6
-rw-r--r--phpBB/includes/acp/acp_php_info.php3
-rw-r--r--phpBB/includes/acp/acp_profile.php5
-rw-r--r--phpBB/includes/acp/acp_prune.php5
-rw-r--r--phpBB/includes/acp/acp_ranks.php6
-rw-r--r--phpBB/includes/acp/acp_reasons.php3
-rw-r--r--phpBB/includes/acp/acp_search.php4
-rw-r--r--phpBB/includes/acp/acp_users.php4
-rw-r--r--phpBB/includes/acp/acp_words.php3
-rw-r--r--phpBB/includes/bbcode.php2
-rw-r--r--phpBB/includes/functions_acp.php6
-rw-r--r--phpBB/includes/functions_admin.php2
-rw-r--r--phpBB/includes/functions_compress.php1
-rw-r--r--phpBB/includes/functions_display.php1
-rw-r--r--phpBB/includes/functions_download.php2
-rw-r--r--phpBB/includes/functions_module.php4
-rw-r--r--phpBB/includes/functions_user.php2
-rw-r--r--phpBB/includes/mcp/mcp_front.php2
-rw-r--r--phpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php4
-rw-r--r--phpBB/includes/mcp/mcp_notes.php6
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_post.php3
-rw-r--r--phpBB/includes/mcp/mcp_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_topic.php2
-rw-r--r--phpBB/includes/mcp/mcp_warn.php9
-rw-r--r--phpBB/includes/ucp/ucp_activate.php2
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php1
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php2
-rw-r--r--phpBB/includes/ucp/ucp_groups.php5
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php3
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php3
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php2
-rw-r--r--phpBB/includes/ucp/ucp_profile.php3
-rw-r--r--phpBB/includes/ucp/ucp_register.php2
-rw-r--r--phpBB/includes/ucp/ucp_remind.php2
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php2
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php2
-rw-r--r--phpBB/phpbb/captcha/gd.php5
-rw-r--r--phpBB/phpbb/captcha/gd_wave.php5
-rw-r--r--phpBB/phpbb/captcha/plugins/captcha_abstract.php8
-rw-r--r--phpBB/phpbb/captcha/plugins/gd.php11
-rw-r--r--phpBB/phpbb/captcha/plugins/gd_wave.php2
-rw-r--r--phpBB/phpbb/db/driver/oracle.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php1
-rw-r--r--phpBB/phpbb/files/types/remote.php1
-rw-r--r--phpBB/phpbb/install/console/command/install/config/validate.php2
-rw-r--r--phpBB/phpbb/install/controller/install.php1
-rw-r--r--phpBB/phpbb/report/report_handler_post.php2
-rw-r--r--phpBB/phpbb/template/twig/node/includejs.php2
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php3
-rw-r--r--phpBB/phpbb/textformatter/s9e/renderer.php1
72 files changed, 85 insertions, 144 deletions
diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php
index c3cf90773e..631b7d05ca 100644
--- a/phpBB/develop/benchmark.php
+++ b/phpBB/develop/benchmark.php
@@ -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
diff --git a/phpBB/develop/unicode_testing.php b/phpBB/develop/unicode_testing.php
index ca6d1b5f48..01586ca09b 100644
--- a/phpBB/develop/unicode_testing.php
+++ b/phpBB/develop/unicode_testing.php
@@ -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)))
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index c9225a7eae..114cba37f6 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -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');
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 5a0ede1de3..92be65ac97 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -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';
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 422e1e34d7..e89b16663c 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -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;
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 9a3b86a16a..067436d0ed 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -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');
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 984301a38f..c9d24f9254 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -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
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index b2a7128209..e54fd57e78 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -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');
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 98c74ff8b3..57eefad02d 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -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';
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 7bcf6e1957..31fbbde2a7 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -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;
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 7f1e629875..0bd3adee3d 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -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';
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index c9bb4bee14..6b02af12d5 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -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');
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 57a36bb9f3..a30381de7b 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -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');
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 8c021560a0..7ec43f45cc 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -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'))
{
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 1726728086..5dec6bb7d4 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -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';
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 56039ff302..c33ca8c4fc 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -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);
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 2d71ab4c71..a91ba85e3b 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -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'))
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index 26e7266409..ec67a6d567 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -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?
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 810a111edb..2a1afe80d4 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -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')
{
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 07620d0dcd..e5255936f8 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -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')))
{
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 2ea1e89df6..b7f31e5656 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -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));
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index 2921d6500b..4d2b64d74c 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -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 . '
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index 56f0296423..0d221bba3c 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -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'));
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 25fc1ed8dc..17b97df168 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -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;
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 32f5ffdc44..db3671385a 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -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;
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index ea8d47a109..e5eeb7ab07 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -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');
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 41d4ec40fe..eb6133d013 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -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))
{
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 4a52657023..b0b5074480 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -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
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 459d61a17a..37a752174a 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index e768a0f47b..910708f502 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -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);
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index e3412c9875..e4df57265d 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -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', '');
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 6aabfdf641..916655e77c 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -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'];
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 144e6b4e7c..2e715d5e87 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -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));
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 2edc493500..952b4b444b 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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']))
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 23a0604ccd..432b26ad11 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -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;
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index bf2d462801..fca0412321 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -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');
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index e2fb1e4afa..eb51c101c6 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -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;
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 502d4cb1e7..67f59bd618 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -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);
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index 6e1d594135..67a1a959e4 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -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);
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index 33aebccb22..d4340899cd 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -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 . '
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 45265c89e7..be6bea2337 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -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);
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 70794312f4..4903bd9329 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -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'])
{
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index d4c5486ed4..d91e3a8408 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -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&amp;form=mcp&amp;field=username&amp;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');
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index 5bfb688d3a..00044340df 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -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', '');
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index b8cb3c4100..66c3109b3d 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -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))
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index 403f7d37d0..cdf4de65fd 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -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));
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 2746e74ffe..6db57b1cd5 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -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();
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index 902fbaafcf..fc6c71375a 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -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();
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index 2ccd4a7728..1e28ae0d2c 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -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&amp;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)
{
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index e88e40a1cb..af2126c83d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -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');
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 3de3410ea8..d793f2772e 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -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'])
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 215a870007..5d4c39ab78 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -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();
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index f6e9acc8c4..3a643f7c94 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -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 = '';
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 4f9639114f..59cf582130 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -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;
//
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index 2342aa2137..0a46674fb1 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -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'])
{
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index d4e7e70247..fa6a03f87c 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -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 = '';
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index aa2c59f28c..b4becdf328 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -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);
diff --git a/phpBB/phpbb/captcha/gd.php b/phpBB/phpbb/captcha/gd.php
index 652df28f8a..e9538439c6 100644
--- a/phpBB/phpbb/captcha/gd.php
+++ b/phpBB/phpbb/captcha/gd.php
@@ -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);
diff --git a/phpBB/phpbb/captcha/gd_wave.php b/phpBB/phpbb/captcha/gd_wave.php
index d48fc753a5..f2ec4137d2 100644
--- a/phpBB/phpbb/captcha/gd_wave.php
+++ b/phpBB/phpbb/captcha/gd_wave.php
@@ -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;
diff --git a/phpBB/phpbb/captcha/plugins/captcha_abstract.php b/phpBB/phpbb/captcha/plugins/captcha_abstract.php
index b29f144f97..357de0e0a5 100644
--- a/phpBB/phpbb/captcha/plugins/captcha_abstract.php
+++ b/phpBB/phpbb/captcha/plugins/captcha_abstract.php
@@ -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
diff --git a/phpBB/phpbb/captcha/plugins/gd.php b/phpBB/phpbb/captcha/plugins/gd.php
index 1727dcc1bb..831e5bcfdf 100644
--- a/phpBB/phpbb/captcha/plugins/gd.php
+++ b/phpBB/phpbb/captcha/plugins/gd.php
@@ -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';
diff --git a/phpBB/phpbb/captcha/plugins/gd_wave.php b/phpBB/phpbb/captcha/plugins/gd_wave.php
index e1d44df778..bde46f8815 100644
--- a/phpBB/phpbb/captcha/plugins/gd_wave.php
+++ b/phpBB/phpbb/captcha/plugins/gd_wave.php
@@ -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));
}
diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php
index 89e1b68aac..54238a15ef 100644
--- a/phpBB/phpbb/db/driver/oracle.php
+++ b/phpBB/phpbb/db/driver/oracle.php
@@ -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;
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php
index 9f6e3efb91..084d00a13a 100644
--- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php
@@ -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))
{
diff --git a/phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php b/phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php
index 854ed1f568..14b7b7b0f6 100644
--- a/phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php
+++ b/phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php
@@ -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']);
diff --git a/phpBB/phpbb/files/types/remote.php b/phpBB/phpbb/files/types/remote.php
index 4f4ce15c18..33cbfb00ae 100644
--- a/phpBB/phpbb/files/types/remote.php
+++ b/phpBB/phpbb/files/types/remote.php
@@ -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();
diff --git a/phpBB/phpbb/install/console/command/install/config/validate.php b/phpBB/phpbb/install/console/command/install/config/validate.php
index 19b6f99a8b..3bbbc23e34 100644
--- a/phpBB/phpbb/install/console/command/install/config/validate.php
+++ b/phpBB/phpbb/install/console/command/install/config/validate.php
@@ -117,7 +117,7 @@ class validate extends \phpbb\console\command\command
try
{
- $config = $processor->processConfiguration($configuration, $config);
+ $processor->processConfiguration($configuration, $config);
}
catch (Exception $e)
{
diff --git a/phpBB/phpbb/install/controller/install.php b/phpBB/phpbb/install/controller/install.php
index 8bf9062b08..b987d91c6a 100644
--- a/phpBB/phpbb/install/controller/install.php
+++ b/phpBB/phpbb/install/controller/install.php
@@ -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;
diff --git a/phpBB/phpbb/report/report_handler_post.php b/phpBB/phpbb/report/report_handler_post.php
index ce4ed67d27..5574a16dc0 100644
--- a/phpBB/phpbb/report/report_handler_post.php
+++ b/phpBB/phpbb/report/report_handler_post.php
@@ -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
diff --git a/phpBB/phpbb/template/twig/node/includejs.php b/phpBB/phpbb/template/twig/node/includejs.php
index 0f67f9ff60..e77f2afeed 100644
--- a/phpBB/phpbb/template/twig/node/includejs.php
+++ b/phpBB/phpbb/template/twig/node/includejs.php
@@ -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")
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index ffaffbc63c..6470bb8245 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -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
*
diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php
index 2206605ba2..90c39d356d 100644
--- a/phpBB/phpbb/textformatter/s9e/renderer.php
+++ b/phpBB/phpbb/textformatter/s9e/renderer.php
@@ -104,7 +104,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
}
$this->dispatcher = $dispatcher;
$this->renderer = $renderer;
- $renderer = $this;
/**
* Configure the renderer service