diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/captcha/gd.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/captcha/gd_wave.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/captcha/plugins/captcha_abstract.php | 8 | ||||
-rw-r--r-- | phpBB/phpbb/captcha/plugins/gd.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/captcha/plugins/gd_wave.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/oracle.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/files/types/remote.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/install/console/command/install/config/validate.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/install/controller/install.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/report/report_handler_post.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/includejs.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 3 | ||||
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/renderer.php | 1 |
15 files changed, 11 insertions, 37 deletions
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 |