Index: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php (revision 1423)
+++ trunk/phase3/includes/Article.php (revision 1424)
@@ -1640,7 +1640,7 @@
}
function loadFromFileCache() {
- global $wgUseGzip;
+ global $wgUseGzip, $wgOut;
wfDebug(" loadFromFileCache()\n");
$filename=$this->fileCacheName();
$filenamegz = "{$filename}.gz";
@@ -1653,6 +1653,7 @@
header( "Vary: Accept-Encoding" );
$filename = $filenamegz;
}
+ $wgOut->sendCacheControl();
readfile( $filename );
}
Index: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php (revision 1423)
+++ trunk/phase3/includes/OutputPage.php (revision 1424)
@@ -303,6 +303,18 @@
wfProfileOut();
}
+ function sendCacheControl() {
+ if( $this->mLastModified != "" ) {
+ header( "Cache-Control: private, must-revalidate, max-age=0" );
+ header( "Last-modified: {$this->mLastModified}" );
+ } else {
+ header( "Cache-Control: no-cache" ); # Experimental - see below
+ header( "Pragma: no-cache" );
+ header( "Last-modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" );
+ }
+ header( "Expires: Mon, 15 Jan 2001 00:00:00 GMT" ); # Cachers always validate the page!
+ }
+
# Finally, all the text has been munged and accumulated into
# the object, let's actually output it:
#
@@ -314,15 +326,7 @@
$sk = $wgUser->getSkin();
wfProfileIn( "OutputPage::output-headers" );
- if( $this->mLastModified != "" ) {
- header( "Cache-Control: private, must-revalidate, max-age=0" );
- header( "Last-modified: {$this->mLastModified}" );
- } else {
- header( "Cache-Control: no-cache" ); # Experimental - see below
- header( "Pragma: no-cache" );
- header( "Last-modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" );
- }
- header( "Expires: Mon, 15 Jan 2001 00:00:00 GMT" ); # Cachers always validate the page!
+ $this->sendCacheControl();
header( "Content-type: text/html; charset={$wgOutputEncoding}" );
header( "Content-language: {$wgLanguageCode}" );
@@ -649,7 +653,7 @@
#
function doWikiPass2( $text, $linestart )
{
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgMungeDates;
wfProfileIn( "OutputPage::doWikiPass2" );
$text = $this->removeHTMLtags( $text );
@@ -662,7 +666,8 @@
$text = $this->doHeadings( $text );
$text = $this->doBlockLevels( $text, $linestart );
- $text = $wgLang->replaceDates( $text );
+ if($wgMungeDates)
+ $text = $wgLang->replaceDates( $text );
$text = $this->replaceExternalLinks( $text );
$text = $this->replaceInternalLinks ( $text );