From 73e6e5b77faadbb7676961bf38122d669de111db Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 17:50:29 +0100 Subject: [ticket/13454] Remove unused variables This is the first part of the changes. More to come. PHPBB3-13454 --- phpBB/phpbb/db/driver/oracle.php | 2 -- phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php | 2 +- phpBB/phpbb/db/migration/data/v31x/update_custom_bbcodes_with_idn.php | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'phpBB/phpbb/db') 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']); -- cgit v1.2.1 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/db/extractor/oracle_extractor.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'phpBB/phpbb/db') 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(); -- cgit v1.2.1 From 266576c6a4224f4b803040c678020e825a1510b5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 4 Dec 2015 11:50:39 +0100 Subject: [ticket/13454] Remove unused variables Part 4 PHPBB3-13454 --- phpBB/phpbb/db/migrator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db') diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index a809bc14f9..d91860949a 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -535,7 +535,7 @@ class migrator } // Reverse the step that was run - $result = $this->run_step($reverse_step, false, !$revert); + $this->run_step($reverse_step, false, !$revert); } // rethrow the exception -- cgit v1.2.1 From 7a6a16e3a52128179a4f518958f22e773dd94084 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 5 Dec 2015 13:45:16 +0100 Subject: [ticket/13454] Remove unused variables This is part 5 and there is more to come. PHPBB3-13454 --- phpBB/phpbb/db/driver/driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db') diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 5f06cb08fc..30cb667344 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -1012,7 +1012,7 @@ abstract class driver implements driver_interface */ function sql_report($mode, $query = '') { - global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper, $user; + global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper; global $request; if (is_object($request) && !$request->variable('explain', false)) -- cgit v1.2.1 From 73900d1857a9a59eff82b224537a79110466ce7e Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 5 Dec 2015 16:07:14 +0100 Subject: [ticket/13454] Remove more unused variables This should be the last part. Off to checking if the changes were correct. PHPBB3-13454 --- phpBB/phpbb/db/tools/tools.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/db') diff --git a/phpBB/phpbb/db/tools/tools.php b/phpBB/phpbb/db/tools/tools.php index 1d7b2ddfff..f06871a1d7 100644 --- a/phpBB/phpbb/db/tools/tools.php +++ b/phpBB/phpbb/db/tools/tools.php @@ -1116,7 +1116,7 @@ class tools implements tools_interface } // Get type - list($column_type, $orig_column_type) = $this->get_column_type($column_data[0]); + list($column_type) = $this->get_column_type($column_data[0]); // Adjust default value if db-dependent specified if (is_array($column_data[1])) -- cgit v1.2.1