Fix typo in deleteArchivedFiles.inc
authorSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 20:01:14 +0000 (20:01 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 20:01:14 +0000 (20:01 +0000)
Remove unused globals

Add missing global

maintenance/Maintenance.php
maintenance/addwiki.php
maintenance/benchmarkPurge.php
maintenance/deleteArchivedFiles.inc
maintenance/dumpUploads.php
maintenance/generateSitemap.php
maintenance/language/checkLanguage.inc
maintenance/language/diffLanguage.php
maintenance/orphans.php
maintenance/updaters.inc

index ab995df..6405d95 100644 (file)
@@ -642,7 +642,7 @@ abstract class Maintenance {
         */
        public function finalSetup() {
                global $wgCommandLineMode, $wgShowSQLErrors;
-               global $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword;
+               global $wgProfiling, $wgDBadminuser, $wgDBadminpassword;
                global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf;
 
                # Turn off output buffering again, it might have been turned on in the settings files
index de3e038..63e5c0c 100644 (file)
@@ -44,7 +44,7 @@ class AddWiki extends Maintenance {
        }
 
        public function execute() {
-               global $IP, $wgDefaultExternalStore, $wgNoDBParam, $wgPasswordSender;
+               global $IP, $wgDefaultExternalStore, $wgNoDBParam;
 
                $wgNoDBParam = true;
                $lang = $this->getArg( 0 );
index 7a003e5..09b2135 100644 (file)
@@ -31,7 +31,7 @@ class BenchmarkPurge extends Maintenance {
        }
        
        public function execute() {
-               global $wgUseSquid;
+               global $wgUseSquid, wgSquidServers;
                if ( !$wgUseSquid ) {
                        $this->error( "Squid purge benchmark doesn't do much without squid support on." . true );
                } else {
index bcbdbc1..0602340 100644 (file)
@@ -51,7 +51,7 @@ class DeleteArchivedFilesImplementation {
                        } else {
                                $output->handleOutput( "Notice - file '$key' not found in group '$group'\n" );
                                if ( $force ) {
-                                       $outpu->handleOutput( "Got --force, deleting DB entry\n" );
+                                       $ouput->handleOutput( "Got --force, deleting DB entry\n" );
                                        $dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" );
                                }
                        }
index ce572f0..ff6bfdd 100644 (file)
@@ -34,7 +34,7 @@ By default, outputs relative paths against the parent directory of \$wgUploadDir
        }
 
        public function execute() {
-               global $IP, $wgUseSharedUploads;
+               global $IP;
                $this->mAction = 'fetchLocal';
                $this->mBasePath = $this->getOption( 'base', $IP );
                $this->mShared = false;
index 2a9788e..9f356b9 100644 (file)
@@ -141,7 +141,6 @@ class GenerateSitemap extends Maintenance {
         * Execute
         */
        public function execute() {
-               global $wgScriptPath;
                $this->setNamespacePriorities();
                $this->url_limit = 50000;
                $this->size_limit = pow( 2, 20 ) * 10;
index 765c2b7..13fbdae 100644 (file)
@@ -383,7 +383,7 @@ ENDS;
         * @return The checks results as wiki text.
         */
        function outputWiki() {
-               global $wgContLang, $IP;
+               global $wgContLang;
                $detailText = '';
                $rows[] = '! Language !! Code !! Total !! ' . implode( ' !! ', array_diff( $this->checks, $this->nonMessageChecks() ) );
                foreach ( $this->results as $code => $results ) {
index 4ead2ce..45357b6 100644 (file)
@@ -75,7 +75,6 @@ function getMediawikiMessages( $languageCode = 'En' ) {
 
        $foo = "wgAllMessages$languageCode";
        global $$foo;
-       global $wgSkinNamesEn; // potentially unused global declaration?
 
        // it might already be loaded in LocalSettings.php
        if ( !isset( $$foo ) ) {
index 8453623..4a04a93 100644 (file)
@@ -133,7 +133,6 @@ class Orphans extends Maintenance {
                " );
                $widows = $dbw->numRows( $result );
                if ( $widows > 0 ) {
-                       global $wgContLang;
                        $this->output( "$widows childless pages...\n" );
                        $this->output( sprintf( "%10s %11s %2s %s\n", 'page_id', 'page_latest', 'ns', 'page_title' ) );
                        foreach ( $result as $row ) {
index d81c3b1..3a08725 100644 (file)
@@ -270,7 +270,6 @@ function do_watchlist_update() {
 
 function do_copy_newtalk_to_watchlist() {
        global $wgDatabase;
-       global $wgCommandLineMode; # this needs to be saved while getID() and getName() are called
 
        $res = $wgDatabase->safeQuery( 'SELECT user_id, user_ip FROM !',
                $wgDatabase->tableName( 'user_newtalk' ) );
@@ -937,7 +936,7 @@ function purge_cache() {
 }
 
 function do_all_updates( $shared = false, $purge = true ) {
-       global $wgNewTables, $wgExtModifiedFields, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype, $IP;
+       global $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype;
 
        wfRunHooks( 'LoadExtensionSchemaUpdates' );
 
@@ -1130,7 +1129,6 @@ function do_unique_pl_tl_il() {
 }
 
 function do_log_search_population() {
-       global $wgDatabase;
        if ( update_row_exists( 'populate log_search' ) ) {
                wfOut( "...log_search table already populated.\n" );
                return;
@@ -1308,7 +1306,7 @@ END;
 }
 
 function do_postgres_updates() {
-       global $wgDatabase, $wgVersion, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
+       global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
 
        # # Gather version numbers in case we need them
        $version = $wgDatabase->getServerVersion(); # # long string