Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2845,7 +2845,7 @@ |
2846 | 2846 | |
2847 | 2847 | $header = "$wgSitename has a problem"; |
2848 | 2848 | |
2849 | | - if ( $wgLang instanceof Language ) { |
| 2849 | + if ( is_object( $wgLang ) ) { |
2850 | 2850 | $header = htmlspecialchars( $wgLang->getMessage( 'dberr-header' ) ); |
2851 | 2851 | } |
2852 | 2852 | |
— | — | @@ -2859,7 +2859,7 @@ |
2860 | 2860 | $again = 'Try waiting a few minutes and reloading.'; |
2861 | 2861 | $info = '(Can\'t contact the database server: $1)'; |
2862 | 2862 | |
2863 | | - if ( $wgLang instanceof Language ) { |
| 2863 | + if ( is_object( $wgLang ) ) { |
2864 | 2864 | $sorry = htmlspecialchars( $wgLang->getMessage( 'dberr-problems' ) ); |
2865 | 2865 | $again = htmlspecialchars( $wgLang->getMessage( 'dberr-again' ) ); |
2866 | 2866 | $info = htmlspecialchars( $wgLang->getMessage( 'dberr-info' ) ); |
— | — | @@ -2896,7 +2896,7 @@ |
2897 | 2897 | $cachederror = "This is a cached copy of the requested page, and may not be up to date. "; |
2898 | 2898 | |
2899 | 2899 | # Localize it if possible... |
2900 | | - if ( $wgLang instanceof Language ) { |
| 2900 | + if ( is_object( $wgLang ) ) { |
2901 | 2901 | $cachederror = htmlspecialchars( $wgLang->getMessage( 'dberr-cachederror' ) ); |
2902 | 2902 | } |
2903 | 2903 | |
— | — | @@ -2921,7 +2921,7 @@ |
2922 | 2922 | $outofdate = "Note that their indexes of our content may be out of date."; |
2923 | 2923 | $googlesearch = "Search"; |
2924 | 2924 | |
2925 | | - if ( $wgLang instanceof Language ) { |
| 2925 | + if ( is_object( $wgLang ) ) { |
2926 | 2926 | $usegoogle = htmlspecialchars( $wgLang->getMessage( 'dberr-usegoogle' ) ); |
2927 | 2927 | $outofdate = htmlspecialchars( $wgLang->getMessage( 'dberr-outofdate' ) ); |
2928 | 2928 | $googlesearch = htmlspecialchars( $wgLang->getMessage( 'searchbutton' ) ); |
— | — | @@ -2963,7 +2963,7 @@ |
2964 | 2964 | |
2965 | 2965 | $mainpage = 'Main Page'; |
2966 | 2966 | |
2967 | | - if ( $wgLang instanceof Language ) { |
| 2967 | + if ( is_object( $wgLang ) ) { |
2968 | 2968 | $mainpage = htmlspecialchars( $wgLang->getMessage( 'mainpage' ) ); |
2969 | 2969 | } |
2970 | 2970 | |
Index: trunk/phase3/includes/Exception.php |
— | — | @@ -238,14 +238,24 @@ |
239 | 239 | |
240 | 240 | $title = Html::element( 'title', null, $this->getPageTitle() ); |
241 | 241 | |
242 | | - $left = $wgLang->alignStart(); |
243 | | - $right = $wgLang->alignEnd(); |
| 242 | + $left = 'left'; |
| 243 | + $right = 'right'; |
| 244 | + $dir = 'ltr'; |
| 245 | + $code = 'en'; |
| 246 | + |
| 247 | + if ( $this->useMessageCache() ) { |
| 248 | + $left = $wgLang->alignStart(); |
| 249 | + $right = $wgLang->alignEnd(); |
| 250 | + $dir = $wgLang->getDir(); |
| 251 | + $code = $wgLang->getCode(); |
| 252 | + } |
| 253 | + |
244 | 254 | $header = Html::element( 'img', array( |
245 | 255 | 'src' => $wgLogo, |
246 | 256 | 'style' => "float: $left; margin-$right: 1em;", |
247 | 257 | 'alt' => '' ), $this->getPageTitle() ); |
248 | 258 | |
249 | | - $attribs = array( 'dir' => $wgLang->getDir(), 'lang' => $wgLang->getCode() ); |
| 259 | + $attribs = array( 'dir' => $dir, 'lang' => $code ); |
250 | 260 | |
251 | 261 | return |
252 | 262 | Html::htmlHeader( $attribs ) . |