$title = Html::element( 'title', null, $this->getPageTitle() );
- $left = $wgLang->alignStart();
- $right = $wgLang->alignEnd();
+ $left = 'left';
+ $right = 'right';
+ $dir = 'ltr';
+ $code = 'en';
+
+ if ( $this->useMessageCache() ) {
+ $left = $wgLang->alignStart();
+ $right = $wgLang->alignEnd();
+ $dir = $wgLang->getDir();
+ $code = $wgLang->getCode();
+ }
+
$header = Html::element( 'img', array(
'src' => $wgLogo,
'style' => "float: $left; margin-$right: 1em;",
'alt' => '' ), $this->getPageTitle() );
- $attribs = array( 'dir' => $wgLang->getDir(), 'lang' => $wgLang->getCode() );
+ $attribs = array( 'dir' => $dir, 'lang' => $code );
return
Html::htmlHeader( $attribs ) .
$header = "$wgSitename has a problem";
- if ( $wgLang instanceof Language ) {
+ if ( is_object( $wgLang ) ) {
$header = htmlspecialchars( $wgLang->getMessage( 'dberr-header' ) );
}
$again = 'Try waiting a few minutes and reloading.';
$info = '(Can\'t contact the database server: $1)';
- if ( $wgLang instanceof Language ) {
+ if ( is_object( $wgLang ) ) {
$sorry = htmlspecialchars( $wgLang->getMessage( 'dberr-problems' ) );
$again = htmlspecialchars( $wgLang->getMessage( 'dberr-again' ) );
$info = htmlspecialchars( $wgLang->getMessage( 'dberr-info' ) );
$cachederror = "This is a cached copy of the requested page, and may not be up to date. ";
# Localize it if possible...
- if ( $wgLang instanceof Language ) {
+ if ( is_object( $wgLang ) ) {
$cachederror = htmlspecialchars( $wgLang->getMessage( 'dberr-cachederror' ) );
}
$outofdate = "Note that their indexes of our content may be out of date.";
$googlesearch = "Search";
- if ( $wgLang instanceof Language ) {
+ if ( is_object( $wgLang ) ) {
$usegoogle = htmlspecialchars( $wgLang->getMessage( 'dberr-usegoogle' ) );
$outofdate = htmlspecialchars( $wgLang->getMessage( 'dberr-outofdate' ) );
$googlesearch = htmlspecialchars( $wgLang->getMessage( 'searchbutton' ) );
$mainpage = 'Main Page';
- if ( $wgLang instanceof Language ) {
+ if ( is_object( $wgLang ) ) {
$mainpage = htmlspecialchars( $wgLang->getMessage( 'mainpage' ) );
}