From: Aaron Schulz Date: Mon, 17 Aug 2009 02:46:18 +0000 (+0000) Subject: fixed missing title bug X-Git-Tag: 1.31.0-rc.0~40266 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=844040d985911d3eac858f0f0201555a70e1d975;p=lhc%2Fweb%2Fwiklou.git fixed missing title bug --- diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 7c47c08d12..0d3596a442 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -32,7 +32,8 @@ class RebuildFileCache extends Maintenance { } public function execute() { - global $wgUseFileCache, $wgContentNamespaces, $wgDisableCounters, $wgTitle, $wgArticle, $wgOut; + global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces; + global $wgTitle, $wgArticle, $wgOut, $wgUser; if( !$wgUseFileCache ) { $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); } @@ -73,9 +74,11 @@ class RebuildFileCache extends Maintenance { $rebuilt = false; $wgTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); if( null == $wgTitle ) { - $this->output( "Page {$row->page_id} bad title\n" ); + $this->output( "Page {$row->page_id} has bad title\n" ); continue; // broken title? } + $wgOut->setTitle( $wgTitle ); // set display title + $wgUser->getSkin( $wgTitle ); // set skin title $wgArticle = new Article( $wgTitle ); // If the article is cacheable, then load it if( $wgArticle->isFileCacheable() ) {