Index: trunk/phase3/includes/Article.php |
— | — | @@ -561,7 +561,7 @@ |
562 | 562 | # tents of 'pagetitle-view-mainpage' instead of the default (if |
563 | 563 | # that's not empty). |
564 | 564 | # This message always exists because it is in the i18n files |
565 | | - if ( $this->getTitle()->equals( Title::newMainPage() ) ) { |
| 565 | + if ( $this->getTitle()->isMainPage() ) { |
566 | 566 | $msg = wfMessage( 'pagetitle-view-mainpage' )->inContentLanguage(); |
567 | 567 | if ( !$msg->isDisabled() ) { |
568 | 568 | $wgOut->setHTMLTitle( $msg->title( $this->getTitle() )->text() ); |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -1898,6 +1898,7 @@ |
1899 | 1899 | * acidentally creating new bugs where $title->equals( Title::newFromText() ) |
1900 | 1900 | * ends up reporting something differently than $title->isMainPage(); |
1901 | 1901 | * |
| 1902 | + * @since 1.18 |
1902 | 1903 | * @return Bool |
1903 | 1904 | */ |
1904 | 1905 | public function isMainPage() { |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -218,6 +218,10 @@ |
219 | 219 | return preg_match( '/^[a-z0-9-]+$/i', $code ); |
220 | 220 | } |
221 | 221 | |
| 222 | + /** |
| 223 | + * @param $code |
| 224 | + * @return String Name of the language class |
| 225 | + */ |
222 | 226 | public static function classFromCode( $code ) { |
223 | 227 | if ( $code == 'en' ) { |
224 | 228 | return 'Language'; |
— | — | @@ -226,6 +230,11 @@ |
227 | 231 | } |
228 | 232 | } |
229 | 233 | |
| 234 | + /** |
| 235 | + * Includes language class files |
| 236 | + * |
| 237 | + * @param $class Name of the language class |
| 238 | + */ |
230 | 239 | public static function preloadLanguageClass( $class ) { |
231 | 240 | global $IP; |
232 | 241 | |