*/
public $mBodytext = '';
- /**
- * Holds the debug lines that will be output as comments in page source if
- * $wgDebugComments is enabled. See also $wgShowDebug.
- * @deprecated since 1.20; use MWDebug class instead.
- */
- public $mDebugtext = '';
-
/** @var string Stores contents of "<title>" tag */
private $mHTMLtitle = '';
* @throws MWException
*/
public function output( $return = false ) {
+ global $wgContLang;
+
if ( $this->mDoNothing ) {
return $return ? '' : null;
}
ob_start();
$response->header( 'Content-type: ' . $config->get( 'MimeType' ) . '; charset=UTF-8' );
- $response->header( 'Content-language: ' . $config->get( 'LanguageCode' ) );
+ $response->header( 'Content-language: ' . $wgContLang->getHtmlCode() );
// Avoid Internet Explorer "compatibility view" in IE 8-10, so that
// jQuery etc. can work correctly.
* Output a standard error page
*
* showErrorPage( 'titlemsg', 'pagetextmsg' );
- * showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) );
+ * showErrorPage( 'titlemsg', 'pagetextmsg', [ 'param1', 'param2' ] );
* showErrorPage( 'titlemsg', $messageObject );
* showErrorPage( $titleMessageObject, $messageObject );
*
if ( $user->isLoggedIn() ) {
$vars['wgUserId'] = $user->getId();
$vars['wgUserEditCount'] = $user->getEditCount();
- $userReg = wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
- $vars['wgUserRegistration'] = $userReg !== null ? ( $userReg * 1000 ) : null;
+ $userReg = $user->getRegistration();
+ $vars['wgUserRegistration'] = $userReg ? wfTimestamp( TS_UNIX, $userReg ) * 1000 : null;
// Get the revision ID of the oldest new message on the user's talk
// page. This can be used for constructing new message alerts on
// the client side.