From: Sam Reed Date: Sat, 24 Jul 2010 20:01:14 +0000 (+0000) Subject: Fix typo in deleteArchivedFiles.inc X-Git-Tag: 1.31.0-rc.0~35969 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=534611b355043343668825a9e4e9c22abdc92b9c;p=lhc%2Fweb%2Fwiklou.git Fix typo in deleteArchivedFiles.inc Remove unused globals Add missing global --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index ab995df982..6405d95c91 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -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 diff --git a/maintenance/addwiki.php b/maintenance/addwiki.php index de3e0383b6..63e5c0c49a 100644 --- a/maintenance/addwiki.php +++ b/maintenance/addwiki.php @@ -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 ); diff --git a/maintenance/benchmarkPurge.php b/maintenance/benchmarkPurge.php index 7a003e5722..09b2135555 100644 --- a/maintenance/benchmarkPurge.php +++ b/maintenance/benchmarkPurge.php @@ -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 { diff --git a/maintenance/deleteArchivedFiles.inc b/maintenance/deleteArchivedFiles.inc index bcbdbc1992..0602340392 100644 --- a/maintenance/deleteArchivedFiles.inc +++ b/maintenance/deleteArchivedFiles.inc @@ -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" ); } } diff --git a/maintenance/dumpUploads.php b/maintenance/dumpUploads.php index ce572f0235..ff6bfdd181 100644 --- a/maintenance/dumpUploads.php +++ b/maintenance/dumpUploads.php @@ -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; diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index 2a9788e9f9..9f356b934b 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -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; diff --git a/maintenance/language/checkLanguage.inc b/maintenance/language/checkLanguage.inc index 765c2b714c..13fbdaee85 100644 --- a/maintenance/language/checkLanguage.inc +++ b/maintenance/language/checkLanguage.inc @@ -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 ) { diff --git a/maintenance/language/diffLanguage.php b/maintenance/language/diffLanguage.php index 4ead2cee23..45357b66a3 100644 --- a/maintenance/language/diffLanguage.php +++ b/maintenance/language/diffLanguage.php @@ -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 ) ) { diff --git a/maintenance/orphans.php b/maintenance/orphans.php index 845362345b..4a04a93489 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -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 ) { diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index d81c3b11f0..3a08725e70 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -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