Follow up r64876. Try to fix pagetitle-view-mainpage.
authorPhilip Tzou <philip@users.mediawiki.org>
Sun, 11 Apr 2010 13:04:58 +0000 (13:04 +0000)
committerPhilip Tzou <philip@users.mediawiki.org>
Sun, 11 Apr 2010 13:04:58 +0000 (13:04 +0000)
includes/Article.php

index 3211e6f..7915e80 100644 (file)
@@ -832,15 +832,6 @@ class Article {
                        wfIncrStats( 'pcache_miss_stub' );
                }
 
-               # For the main page, overwrite the <title> element with the con-
-               # tents of 'pagetitle-view-mainpage' instead of the default (if
-               # that's not empty).
-               if ( $this->mTitle->equals( Title::newMainPage() )
-                       && ( $m = wfMsgForContent( 'pagetitle-view-mainpage' ) ) !== '' )
-               {
-                       $wgOut->setHTMLTitle( $m );
-               }
-
                $wasRedirected = $this->showRedirectedFromHeader();
                $this->showNamespaceHeader();
 
@@ -965,6 +956,15 @@ class Article {
                        }
                }
 
+               # For the main page, overwrite the <title> element with the con-
+               # tents of 'pagetitle-view-mainpage' instead of the default (if
+               # that's not empty).
+               if ( $this->mTitle->equals( Title::newMainPage() )
+                       && ( $m = wfMsgForContent( 'pagetitle-view-mainpage' ) ) !== '' )
+               {
+                       $wgOut->setHTMLTitle( $m );
+               }
+
                # Now that we've filled $this->mParserOutput, we know whether
                # there are any __NOINDEX__ tags on the page
                $policy = $this->getRobotPolicy( 'view' );