From a6f56411a2102127b4e1b1300a539a9947f95709 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 16 Apr 2011 11:28:35 +0000 Subject: [PATCH] Remove some unused variables/globals Fix another unreachable statement --- includes/Import.php | 1 - includes/Preferences.php | 3 --- includes/actions/CreditsAction.php | 3 +-- includes/db/DatabaseOracle.php | 2 +- includes/search/SearchOracle.php | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/includes/Import.php b/includes/Import.php index c7662419dc..bdf70aab69 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -202,7 +202,6 @@ class WikiImporter { public function importUpload( $revision ) { $dbw = wfGetDB( DB_MASTER ); return $dbw->deadlockLoop( array( $revision, 'importUpload' ) ); - return false; } /** diff --git a/includes/Preferences.php b/includes/Preferences.php index 038dced97a..b93826711e 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -934,9 +934,6 @@ class Preferences { 'section' => 'searchoptions/advancedsearchoptions', ); - // Searchable namespaces back-compat with old format - $searchableNamespaces = SearchEngine::searchableNamespaces(); - $nsOptions = array(); foreach ( $wgContLang->getNamespaces() as $ns => $name ) { diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php index 72a96833d5..5dcb7b397f 100644 --- a/includes/actions/CreditsAction.php +++ b/includes/actions/CreditsAction.php @@ -186,7 +186,7 @@ class CreditsAction extends FormlessAction { * @return String: html */ protected static function link( User $user ) { - global $wgUser, $wgHiddenPrefs; + global $wgHiddenPrefs; if ( !in_array( 'realname', $wgHiddenPrefs ) && !$user->isAnon() ) { $real = $user->getRealName(); } else { @@ -225,7 +225,6 @@ class CreditsAction extends FormlessAction { * @return String: html */ protected function othersLink() { - global $wgUser; return Linker::link( $this->getTitle(), wfMsgHtml( 'others' ), diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 40664504a5..25c1586b09 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1085,7 +1085,7 @@ class DatabaseOracle extends DatabaseBase { } public function removeIdentifierQuotes( $s ) { - return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5); ; + return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5); } public function isQuotedIdentifier( $s ) { diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php index edd19dd94a..ff1f28fa0c 100644 --- a/includes/search/SearchOracle.php +++ b/includes/search/SearchOracle.php @@ -238,7 +238,6 @@ class SearchOracle extends SearchEngine { * @param $text String */ function update($id, $title, $text) { - global $wgDBprefix; $dbw = wfGetDB(DB_MASTER); $dbw->replace('searchindex', array('si_page'), -- 2.20.1