From f50ba9ab4f6e74e4d472c9e2012dfdd29720dfe9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 18:19:02 +0100 Subject: [ticket/13454] Remove unused variables This is part 2 of the pr. PHPBB3-13454 --- phpBB/phpbb/captcha/plugins/captcha_abstract.php | 2 +- phpBB/phpbb/db/extractor/oracle_extractor.php | 2 -- phpBB/phpbb/log/log.php | 2 +- phpBB/phpbb/search/fulltext_native.php | 3 --- phpBB/phpbb/search/fulltext_sphinx.php | 5 ++--- phpBB/phpbb/textformatter/s9e/renderer.php | 1 - phpBB/phpbb/tree/nestedset.php | 1 - phpBB/phpbb/user.php | 2 +- 8 files changed, 5 insertions(+), 13 deletions(-) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/captcha/plugins/captcha_abstract.php b/phpBB/phpbb/captcha/plugins/captcha_abstract.php index 357de0e0a5..82b08704ff 100644 --- a/phpBB/phpbb/captcha/plugins/captcha_abstract.php +++ b/phpBB/phpbb/captcha/plugins/captcha_abstract.php @@ -191,7 +191,7 @@ abstract class captcha_abstract function validate() { - global $config, $db, $user; + global $user; if (!$user->is_setup()) { diff --git a/phpBB/phpbb/db/extractor/oracle_extractor.php b/phpBB/phpbb/db/extractor/oracle_extractor.php index 05f7b8ac95..79a991889b 100644 --- a/phpBB/phpbb/db/extractor/oracle_extractor.php +++ b/phpBB/phpbb/db/extractor/oracle_extractor.php @@ -192,8 +192,6 @@ class oracle_extractor extends base_extractor $ary_name[$i] = ocicolumnname($result, $i + 1); } - $sql_data = ''; - while ($row = $this->db->sql_fetchrow($result)) { $schema_vals = $schema_fields = array(); diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index f0ba120625..436c21bdad 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -420,7 +420,7 @@ class log implements \phpbb\log\log_interface $this->entry_count = 0; $this->last_page_offset = $offset; - $post_id_list = $topic_id_list = $reportee_id_list = array(); + $topic_id_list = $reportee_id_list = array(); $profile_url = ($this->get_is_admin() && $this->phpbb_admin_path) ? append_sid("{$this->phpbb_admin_path}index.{$this->php_ext}", 'i=users&mode=overview') : append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile'); diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 3a74955a18..a971b91b04 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -352,9 +352,6 @@ class fulltext_native extends \phpbb\search\base $this->must_not_contain_ids = array(); $this->must_exclude_one_ids = array(); - $mode = ''; - $ignore_no_id = true; - foreach ($query as $word) { if (empty($word)) diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 372a2792cf..dfe878f0de 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -404,7 +404,7 @@ class fulltext_sphinx $variable = $section->get_variable_by_name($key); if (!$variable) { - $variable = $section->create_variable($key, $value); + $section->create_variable($key, $value); } else { @@ -413,7 +413,7 @@ class fulltext_sphinx } else { - $variable = $section->create_variable($key, $value); + $section->create_variable($key, $value); } } } @@ -437,7 +437,6 @@ class fulltext_sphinx $match = array('#\sand\s#i', '#\sor\s#i', '#\snot\s#i', '#\+#', '#-#', '#\|#', '#@#'); $replace = array(' & ', ' | ', ' - ', ' +', ' -', ' |', ''); - $replacements = 0; $keywords = preg_replace($match, $replace, $keywords); $this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED); } diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php index 90c39d356d..6ba75d0c04 100644 --- a/phpBB/phpbb/textformatter/s9e/renderer.php +++ b/phpBB/phpbb/textformatter/s9e/renderer.php @@ -232,7 +232,6 @@ class renderer implements \phpbb\textformatter\renderer_interface { $xml = $this->quote_helper->inject_metadata($xml); } - $renderer = $this; /** * Modify a parsed text before it is rendered diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php index 8490c7c299..63c59c0a3d 100644 --- a/phpBB/phpbb/tree/nestedset.php +++ b/phpBB/phpbb/tree/nestedset.php @@ -391,7 +391,6 @@ abstract class nestedset implements \phpbb\tree\tree_interface throw new \OutOfBoundsException($this->message_prefix . 'INVALID_PARENT'); } - $diff = sizeof($move_items) * 2; $sql_exclude_moved_items = $this->db->sql_in_set($this->column_item_id, $move_items, true); $this->db->sql_transaction('begin'); diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 173b20ee53..1403c575af 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -281,7 +281,7 @@ class user extends \phpbb\session // User has wrong style if (!$this->style && $style_id == $this->data['user_style']) { - $style_id = $this->data['user_style'] = $config['default_style']; + $this->data['user_style'] = $config['default_style']; $sql = 'UPDATE ' . USERS_TABLE . " SET user_style = $style_id -- cgit v1.2.1