<title>$title</title>
</head>
<body>
- <h1><img src='$wgLogo' style='float:left;margin-right:1em' alt=''>$title</h1>
+ <h1><img src='$wgLogo' style='float:left;margin-right:1em' alt=''/>$title</h1>
";
}
public function loadFromFileCache() {
global $wgOut, $wgMimeType, $wgOutputEncoding, $wgContLanguageCode;
wfDebug(" loadFromFileCache()\n");
-
$filename = $this->fileCacheName();
// Raw pages should handle cache control on their own,
// even when using file cache. This reduces hits from clients.
}
}
readfile( $filename );
+ $wgOut->disable(); // tell $wgOut that output is taken care of
}
protected function checkCacheDirs() {
*
* @return bool True iff cache-ok headers was sent.
*/
- function checkLastModified ( $timestamp ) {
+ function checkLastModified( $timestamp ) {
global $wgCachePages, $wgCacheEpoch, $wgUser, $wgRequest;
if ( !$timestamp || $timestamp == '19700101000000' ) {
public function setOnloadHandler( $js ) { $this->mOnloadHandler = $js; }
public function getOnloadHandler() { return $this->mOnloadHandler; }
public function disable() { $this->mDoNothing = true; }
+ public function isDisabled() { return $this->mDoNothing; }
public function setArticleRelated( $v ) {
$this->mIsArticleRelated = $v;
<input type="hidden" name="ie" value="$wgInputEncoding" />
<input type="hidden" name="oe" value="$wgInputEncoding" />
- <img src="http://www.google.com/logos/Logo_40wht.gif" style="float:left; margin-left: 1.5em; margin-right: 1.5em;" />
+ <img src="http://www.google.com/logos/Logo_40wht.gif" alt="" style="float:left; margin-left: 1.5em; margin-right: 1.5em;" />
<input type="text" name="q" size="31" maxlength="255" value="$search" />
<input type="submit" name="btnG" value="$googlesearch" />
}
function fileCachedPage() {
- global $wgTitle, $title, $wgLang;
-
+ global $wgTitle, $title, $wgLang, $wgOut;
+ if( $wgOut->isDisabled() ) return; // Done already?
$cachederror = "The following is a cached copy of the requested page, and may not be up to date. ";
$mainpage = 'Main Page';
if ( $wgLang instanceof Language ) {