Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2845,7 +2845,7 @@ |
2846 | 2846 | |
2847 | 2847 | $header = "$wgSitename has a problem"; |
2848 | 2848 | |
2849 | | - if ( is_object( $wgLang ) ) { |
| 2849 | + if ( $wgLang instanceof Language ) { |
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 ( is_object( $wgLang ) ) { |
| 2863 | + if ( $wgLang instanceof Language ) { |
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 ( is_object( $wgLang ) ) { |
| 2900 | + if ( $wgLang instanceof Language ) { |
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 ( is_object( $wgLang ) ) { |
| 2925 | + if ( $wgLang instanceof Language ) { |
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 ( is_object( $wgLang ) ) { |
| 2967 | + if ( $wgLang instanceof Language ) { |
2968 | 2968 | $mainpage = htmlspecialchars( $wgLang->getMessage( 'mainpage' ) ); |
2969 | 2969 | } |
2970 | 2970 | |
Index: trunk/phase3/includes/Exception.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | | - return is_object( $wgLang ); |
| 43 | + return $wgLang instanceof Language; |
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | $dir = 'ltr'; |
245 | 245 | $code = 'en'; |
246 | 246 | |
247 | | - if ( $this->useMessageCache() ) { |
| 247 | + if ( $wgLang instanceof Language ) { |
248 | 248 | $left = $wgLang->alignStart(); |
249 | 249 | $right = $wgLang->alignEnd(); |
250 | 250 | $dir = $wgLang->getDir(); |