(bug 15007) New 'pagetitle-view-mainpage' message allows the HTML <title> of the...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 6 Aug 2008 19:20:38 +0000 (19:20 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Wed, 6 Aug 2008 19:20:38 +0000 (19:20 +0000)
CREDITS
RELEASE-NOTES
includes/Article.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

diff --git a/CREDITS b/CREDITS
index e3f9713..1460581 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -19,7 +19,7 @@ following names for their contribution to the product.
 * Tim Starling
 
 == Patch Contributors ==
-* 
+* RememberTheDot
 
 == Translators ==
 * Anders Wegge Jakobsen
index 05eb802..962312c 100644 (file)
@@ -44,6 +44,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   ables into into the output of Skin::makeVariablesScript
 * Added $wgAddGroups and $wgRemoveGroups display on Special:ListGroupRights
 * (bug 14377) Add a date selector to history pages
+* (bug 15007) New 'pagetitle-view-mainpage' message allows the HTML <title> of
+  the main page to be customized
 
 === Bug fixes in 1.14 ===
 
index d6809bf..2c479aa 100644 (file)
@@ -892,6 +892,14 @@ class Article {
                $t = $wgOut->getPageTitle();
                if( empty( $t ) ) {
                        $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+
+                       # 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() ) &&
+                       wfMsgForContent( 'pagetitle-view-mainpage' ) !== '' ) {
+                               $wgOut->setHTMLTitle( wfMsgForContent( 'pagetitle-view-mainpage' ) );
+                       }
                }
 
                # check if we're displaying a [[User talk:x.x.x.x]] anonymous talk page
index cc75ea3..8e25c69 100644 (file)
@@ -728,6 +728,7 @@ See [[Special:Version|version page]].',
 'ok'                           => 'OK',
 'sitetitle'                    => '{{SITENAME}}', # do not translate or duplicate this message to other languages
 'pagetitle'                    => '$1 - {{SITENAME}}', # only translate this message to other languages if you have to change it
+'pagetitle-view-mainpage'      => '', # do not translate or duplicate this message to other languages
 'sitesubtitle'                 => '', # do not translate or duplicate this message to other languages
 'retrievedfrom'                => 'Retrieved from "$1"',
 'youhavenewmessages'           => 'You have $1 ($2).',
index 56e0f1a..8a62a2a 100644 (file)
@@ -150,6 +150,7 @@ $wgIgnoredMessages = array(
        'fewestrevisions-summary',
        'missingfiles-summary',
        'upload-summary',
+       'pagetitle-view-mainpage',
 );
 
 /** Optional messages, which may be translated only if changed in the target language. */
index 1b971e8..42c5b22 100644 (file)
@@ -250,6 +250,7 @@ $wgMessageStructure = array(
                'ok',
                'sitetitle',
                'pagetitle',
+               'pagetitle-view-mainpage',
                'sitesubtitle',
                'retrievedfrom',
                'youhavenewmessages',