r110829 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110828‎ | r110829 | r110830 >
Date:09:37, 7 February 2012
Author:hashar
Status:ok
Tags:core 
Comment:
rebuildFileCache now really disable debugToolbar

r110761 did not properly disabled the debug toolbar. It has to be
done before Setup.php (MWDebug uses a private static to track that
global variable).

really fix r110758 / r110762
Modified paths:
  • /trunk/phase3/maintenance/rebuildFileCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/rebuildFileCache.php
@@ -32,15 +32,21 @@
3333 $this->setBatchSize( 100 );
3434 }
3535
 36+ public function finalSetup() {
 37+ global $wgDebugToolbar;
 38+
 39+ // Debug toolbar makes content uncacheable so we disable it.
 40+ // Has to be done before Setup.php initialize MWDebug
 41+ $wgDebugToolbar = false;
 42+ parent::finalSetup();
 43+ }
 44+
3645 public function execute() {
3746 global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime;
38 - global $wgDebugToolbar;
3947 global $wgTitle, $wgOut;
4048 if ( !$wgUseFileCache ) {
4149 $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
4250 }
43 - // Debug toolbar makes content uncacheable
44 - $wgDebugToolbar = false;
4551
4652 $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters)
4753

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110758reverts r110488...hashar16:42, 6 February 2012
r110761disable wgDebugToolbar when rebuilding file cache...hashar17:17, 6 February 2012
r110762Recommit r110758 (again) now that the problem has been fixed in r110761ialex17:34, 6 February 2012

Status & tagging log