1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merge pull request #4058 from marc1706/ticket/13454

[ticket/13454] Remove unused variables, globals, and parameters

* marc1706/ticket/13454:
  [ticket/13454] Add excessively removed code back
  [ticket/13454] Remove more unused variables
  [ticket/13454] Remove double semi-colons
  [ticket/13454] Remove unused variables
  [ticket/13454] Fix code sniffer complaints
  [ticket/13454] Fix a few issues introduced by overdeleting stuff
  [ticket/13454] Remove unused variables
  [ticket/13454] Remove unused variables
  [ticket/13454] Remove unused variables
  [ticket/13454] Remove unused variables
This commit is contained in:
Tristan Darricau
2016-01-09 17:53:04 +01:00
106 changed files with 240 additions and 454 deletions

View File

@@ -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))

View File

@@ -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;

View File

@@ -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();

View File

@@ -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))
{

View File

@@ -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']);

View File

@@ -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

View File

@@ -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]))