Remove some unused variables/globals
authorSam Reed <reedy@users.mediawiki.org>
Sat, 16 Apr 2011 11:28:35 +0000 (11:28 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 16 Apr 2011 11:28:35 +0000 (11:28 +0000)
Fix another unreachable statement

includes/Import.php
includes/Preferences.php
includes/actions/CreditsAction.php
includes/db/DatabaseOracle.php
includes/search/SearchOracle.php

index c766241..bdf70aa 100644 (file)
@@ -202,7 +202,6 @@ class WikiImporter {
        public function importUpload( $revision ) {
                $dbw = wfGetDB( DB_MASTER );
                return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
-               return false;
        }
 
        /**
index 038dced..b938267 100644 (file)
@@ -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 ) {
index 72a9683..5dcb7b3 100644 (file)
@@ -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' ),
index 4066450..25c1586 100644 (file)
@@ -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 ) {
index edd19dd..ff1f28f 100644 (file)
@@ -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'),