$this->mETag = false;
$this->mRevisionId = null;
$this->mNewSectionLink = false;
+ $this->mTemplateIds = array();
}
public function redirect( $url, $responsecode = '302' ) {
# Wed, 20 Aug 2003 06:51:19 GMT; length=5202
# this breaks strtotime().
$modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
+
+ wfSuppressWarnings(); // E_STRICT system time bitching
$modsinceTime = strtotime( $modsince );
+ wfRestoreWarnings();
+
$ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 );
wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", false );
wfDebug( "$fname: -- we might send Last-Modified : $lastmod\n", false );
if ( $parserOutput->getCacheTime() == -1 ) {
$this->enableClientCache( false );
}
- if ( $parserOutput->mHTMLtitle != "" ) {
- $this->mPagetitle = $parserOutput->mHTMLtitle ;
- }
- if ( $parserOutput->mSubtitle != '' ) {
- $this->mSubtitle .= $parserOutput->mSubtitle ;
- }
$this->mNoGallery = $parserOutput->getNoGallery();
$this->mHeadItems = array_merge( $this->mHeadItems, (array)$parserOutput->mHeadItems );
+ // Versioning...
+ $this->mTemplateIds += (array)$parserOutput->mTemplateIds;
+
+ # Display title
+ if( ( $dt = $parserOutput->getDisplayTitle() ) !== false )
+ $this->setPageTitle( $dt );
+
wfRunHooks( 'OutputPageParserOutput', array( &$this, $parserOutput ) );
}
$msg = 'blockedtext';
}
- $this->addWikiText( wfMsg( $msg, $link, $reason, $ip, $name, $blockid, $blockExpiry ) );
+ /* $ip returns who *is* being blocked, $intended contains who was meant to be blocked.
+ * This could be a username, an ip range, or a single ip. */
+ $intended = $wgUser->mBlock->mAddress;
+
+ $this->addWikiText( wfMsg( $msg, $link, $reason, $ip, $name, $blockid, $blockExpiry, $intended ) );
# Don't auto-return to special pages
if( $return ) {
* @param int $lag Slave lag
*/
public function showLagWarning( $lag ) {
- $message = $lag >= 30 ? 'lag-warn-high' : 'lag-warn-normal';
+ global $wgSlaveLagWarning, $wgSlaveLagCritical;
+
+ if ($lag < $wgSlaveLagWarning)
+ return;
+
+ $message = ($lag >= $wgSlaveLagCritical) ? 'lag-warn-high' : 'lag-warn-normal';
$warning = wfMsgHtml( $message, htmlspecialchars( $lag ) );
$this->addHtml( "<div class=\"mw-{$message}\">\n{$warning}\n</div>\n" );
}
}
-?>
\ No newline at end of file
+