r69841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69840‎ | r69841 | r69842 >
Date:20:01, 24 July 2010
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Fix typo in deleteArchivedFiles.inc

Remove unused globals

Add missing global
Modified paths:
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)
  • /trunk/phase3/maintenance/addwiki.php (modified) (history)
  • /trunk/phase3/maintenance/benchmarkPurge.php (modified) (history)
  • /trunk/phase3/maintenance/deleteArchivedFiles.inc (modified) (history)
  • /trunk/phase3/maintenance/dumpUploads.php (modified) (history)
  • /trunk/phase3/maintenance/generateSitemap.php (modified) (history)
  • /trunk/phase3/maintenance/language/checkLanguage.inc (modified) (history)
  • /trunk/phase3/maintenance/language/diffLanguage.php (modified) (history)
  • /trunk/phase3/maintenance/orphans.php (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpUploads.php
@@ -34,7 +34,7 @@
3535 }
3636
3737 public function execute() {
38 - global $IP, $wgUseSharedUploads;
 38+ global $IP;
3939 $this->mAction = 'fetchLocal';
4040 $this->mBasePath = $this->getOption( 'base', $IP );
4141 $this->mShared = false;
Index: trunk/phase3/maintenance/generateSitemap.php
@@ -141,7 +141,6 @@
142142 * Execute
143143 */
144144 public function execute() {
145 - global $wgScriptPath;
146145 $this->setNamespacePriorities();
147146 $this->url_limit = 50000;
148147 $this->size_limit = pow( 2, 20 ) * 10;
Index: trunk/phase3/maintenance/updaters.inc
@@ -270,7 +270,6 @@
271271
272272 function do_copy_newtalk_to_watchlist() {
273273 global $wgDatabase;
274 - global $wgCommandLineMode; # this needs to be saved while getID() and getName() are called
275274
276275 $res = $wgDatabase->safeQuery( 'SELECT user_id, user_ip FROM !',
277276 $wgDatabase->tableName( 'user_newtalk' ) );
@@ -937,7 +936,7 @@
938937 }
939938
940939 function do_all_updates( $shared = false, $purge = true ) {
941 - global $wgNewTables, $wgExtModifiedFields, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype, $IP;
 940+ global $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype;
942941
943942 wfRunHooks( 'LoadExtensionSchemaUpdates' );
944943
@@ -1130,7 +1129,6 @@
11311130 }
11321131
11331132 function do_log_search_population() {
1134 - global $wgDatabase;
11351133 if ( update_row_exists( 'populate log_search' ) ) {
11361134 wfOut( "...log_search table already populated.\n" );
11371135 return;
@@ -1308,7 +1306,7 @@
13091307 }
13101308
13111309 function do_postgres_updates() {
1312 - global $wgDatabase, $wgVersion, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
 1310+ global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
13131311
13141312 # # Gather version numbers in case we need them
13151313 $version = $wgDatabase->getServerVersion(); # # long string
Index: trunk/phase3/maintenance/addwiki.php
@@ -44,7 +44,7 @@
4545 }
4646
4747 public function execute() {
48 - global $IP, $wgDefaultExternalStore, $wgNoDBParam, $wgPasswordSender;
 48+ global $IP, $wgDefaultExternalStore, $wgNoDBParam;
4949
5050 $wgNoDBParam = true;
5151 $lang = $this->getArg( 0 );
Index: trunk/phase3/maintenance/Maintenance.php
@@ -642,7 +642,7 @@
643643 */
644644 public function finalSetup() {
645645 global $wgCommandLineMode, $wgShowSQLErrors;
646 - global $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword;
 646+ global $wgProfiling, $wgDBadminuser, $wgDBadminpassword;
647647 global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf;
648648
649649 # Turn off output buffering again, it might have been turned on in the settings files
Index: trunk/phase3/maintenance/benchmarkPurge.php
@@ -31,7 +31,7 @@
3232 }
3333
3434 public function execute() {
35 - global $wgUseSquid;
 35+ global $wgUseSquid, wgSquidServers;
3636 if ( !$wgUseSquid ) {
3737 $this->error( "Squid purge benchmark doesn't do much without squid support on." . true );
3838 } else {
Index: trunk/phase3/maintenance/orphans.php
@@ -133,7 +133,6 @@
134134 " );
135135 $widows = $dbw->numRows( $result );
136136 if ( $widows > 0 ) {
137 - global $wgContLang;
138137 $this->output( "$widows childless pages...\n" );
139138 $this->output( sprintf( "%10s %11s %2s %s\n", 'page_id', 'page_latest', 'ns', 'page_title' ) );
140139 foreach ( $result as $row ) {
Index: trunk/phase3/maintenance/language/checkLanguage.inc
@@ -383,7 +383,7 @@
384384 * @return The checks results as wiki text.
385385 */
386386 function outputWiki() {
387 - global $wgContLang, $IP;
 387+ global $wgContLang;
388388 $detailText = '';
389389 $rows[] = '! Language !! Code !! Total !! ' . implode( ' !! ', array_diff( $this->checks, $this->nonMessageChecks() ) );
390390 foreach ( $this->results as $code => $results ) {
Index: trunk/phase3/maintenance/language/diffLanguage.php
@@ -75,7 +75,6 @@
7676
7777 $foo = "wgAllMessages$languageCode";
7878 global $$foo;
79 - global $wgSkinNamesEn; // potentially unused global declaration?
8079
8180 // it might already be loaded in LocalSettings.php
8281 if ( !isset( $$foo ) ) {
Index: trunk/phase3/maintenance/deleteArchivedFiles.inc
@@ -51,7 +51,7 @@
5252 } else {
5353 $output->handleOutput( "Notice - file '$key' not found in group '$group'\n" );
5454 if ( $force ) {
55 - $outpu->handleOutput( "Got --force, deleting DB entry\n" );
 55+ $ouput->handleOutput( "Got --force, deleting DB entry\n" );
5656 $dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" );
5757 }
5858 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r69842Followup r69841, missing $reedy20:01, 24 July 2010
r69844Followup r69841 add missing t from outputreedy20:17, 24 July 2010
r69967Revert r69841, r69882, r69892, r69896, r69910 in phase3/maintenance/language ...siebrand20:29, 26 July 2010

Comments

#Comment by Platonides (talk | contribs)   20:15, 24 July 2010

-$outpu +$ouput

Not quite yet.

Status & tagging log