r38730 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38729‎ | r38730 | r38731 >
Date:19:20, 6 August 2008
Author:simetrical
Status:old
Tags:
Comment:
(bug 15007) New 'pagetitle-view-mainpage' message allows the HTML <title> of the main page to be customized.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -250,6 +250,7 @@
251251 'ok',
252252 'sitetitle',
253253 'pagetitle',
 254+ 'pagetitle-view-mainpage',
254255 'sitesubtitle',
255256 'retrievedfrom',
256257 'youhavenewmessages',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -150,6 +150,7 @@
151151 'fewestrevisions-summary',
152152 'missingfiles-summary',
153153 'upload-summary',
 154+ 'pagetitle-view-mainpage',
154155 );
155156
156157 /** Optional messages, which may be translated only if changed in the target language. */
Index: trunk/phase3/CREDITS
@@ -19,7 +19,7 @@
2020 * Tim Starling
2121
2222 == Patch Contributors ==
23 -*
 23+* RememberTheDot
2424
2525 == Translators ==
2626 * Anders Wegge Jakobsen
Index: trunk/phase3/includes/Article.php
@@ -892,6 +892,14 @@
893893 $t = $wgOut->getPageTitle();
894894 if( empty( $t ) ) {
895895 $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
 896+
 897+ # For the main page, overwrite the <title> element with the con-
 898+ # tents of 'pagetitle-view-mainpage' instead of the default (if
 899+ # that's not empty).
 900+ if( $this->mTitle->equals( Title::newMainPage() ) &&
 901+ wfMsgForContent( 'pagetitle-view-mainpage' ) !== '' ) {
 902+ $wgOut->setHTMLTitle( wfMsgForContent( 'pagetitle-view-mainpage' ) );
 903+ }
896904 }
897905
898906 # check if we're displaying a [[User talk:x.x.x.x]] anonymous talk page
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -728,6 +728,7 @@
729729 'ok' => 'OK',
730730 'sitetitle' => '{{SITENAME}}', # do not translate or duplicate this message to other languages
731731 'pagetitle' => '$1 - {{SITENAME}}', # only translate this message to other languages if you have to change it
 732+'pagetitle-view-mainpage' => '', # do not translate or duplicate this message to other languages
732733 'sitesubtitle' => '', # do not translate or duplicate this message to other languages
733734 'retrievedfrom' => 'Retrieved from "$1"',
734735 'youhavenewmessages' => 'You have $1 ($2).',
Index: trunk/phase3/RELEASE-NOTES
@@ -44,6 +44,8 @@
4545 ables into into the output of Skin::makeVariablesScript
4646 * Added $wgAddGroups and $wgRemoveGroups display on Special:ListGroupRights
4747 * (bug 14377) Add a date selector to history pages
 48+* (bug 15007) New 'pagetitle-view-mainpage' message allows the HTML <title> of
 49+ the main page to be customized
4850
4951 === Bug fixes in 1.14 ===
5052

Status & tagging log