public function reportHTML() { global $wgUseFileCache; # Check whether we can serve a file-cached copy of the page with the error underneath if ($wgUseFileCache) { try { $cache = $this->fileCachedPage(); # Cached version on file system? if ($cache !== null) { # Hack: extend the body for error messages $cache = str_replace(array('</html>', '</body>'), '', $cache); # Add cache notice... $cache .= '<div style="color:red;font-size:150%;font-weight:bold;">' . htmlspecialchars($this->msg('dberr-cachederror', 'This is a cached copy of the requested page, and may not be up to date. ')) . '</div>'; # Output cached page with notices on bottom and re-close body echo "{$cache}<hr />{$this->getHTML()}</body></html>"; return; } } catch (MWException $e) { // Do nothing, just use the default page } } # We can't, cough and die in the usual fashion parent::reportHTML(); }