* (bug 22852) "Served in" comment is now the time used to cache a single page when...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 3 Apr 2010 08:56:07 +0000 (08:56 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 3 Apr 2010 08:56:07 +0000 (08:56 +0000)
RELEASE-NOTES
maintenance/rebuildFileCache.php

index 31962ec..12a21f8 100644 (file)
@@ -75,6 +75,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22867) "View source" tab is now only displayed if there's source text
 * (bug 19393) Feeds now format dates in user language rather than content
   language
+* (bug 22852) "Served in" comment is now the time used to cache a single page
+  when using rebuildFileCache.php
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent
index 2a4e488..78b5ce8 100644 (file)
@@ -32,7 +32,7 @@ class RebuildFileCache extends Maintenance {
        }
 
        public function execute() {
-               global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces;
+               global $wgUseFileCache, $wgDisableCounters, $wgContentNamespaces, $wgRequestTime;
                global $wgTitle, $wgArticle, $wgOut, $wgUser;
                if( !$wgUseFileCache ) {
                        $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
@@ -72,6 +72,7 @@ class RebuildFileCache extends Maintenance {
                        );
                        foreach( $res as $row ) {
                                $rebuilt = false;
+                               $wgRequestTime = wfTime(); # bug 22852
                                $wgTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
                                if( null == $wgTitle ) {
                                        $this->output( "Page {$row->page_id} has bad title\n" );
@@ -91,7 +92,7 @@ class RebuildFileCache extends Maintenance {
                                                        continue; // done already!
                                                }
                                        }
-                                       ob_start( array(&$cache, 'saveToFileCache' ) ); // save on ob_end_clean()
+                                       ob_start( array( &$cache, 'saveToFileCache' ) ); // save on ob_end_clean()
                                        $wgUseFileCache = false; // hack, we don't want $wgArticle fiddling with filecache
                                        $wgArticle->view();
                                        @$wgOut->output(); // header notices