r45407 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45406‎ | r45407 | r45408 >
Date:08:44, 5 January 2009
Author:ialex
Status:ok
Tags:
Comment:
* Use user's language for 'protect-expiring' message in Special:Protectedpages and Special:Protectedtitles, no need to use it as content as it will simply be shown to the user and nothing else
* removed $wgOut->setPagetitle( ... ), already done in SpecialPage::execute()
Modified paths:
  • /trunk/phase3/includes/specials/SpecialProtectedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialProtectedtitles.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php
@@ -16,7 +16,6 @@
1717 function showList( $msg = '' ) {
1818 global $wgOut, $wgRequest;
1919
20 - $wgOut->setPagetitle( wfMsg( "protectedtitles" ) );
2120 if ( "" != $msg ) {
2221 $wgOut->setSubtitle( $msg );
2322 }
@@ -75,7 +74,7 @@
7675 if ( $row->pt_expiry != 'infinity' && strlen($row->pt_expiry) ) {
7776 $expiry = Block::decodeExpiry( $row->pt_expiry );
7877
79 - $expiry_description = wfMsgForContent( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) );
 78+ $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) );
8079
8180 $description_items[] = $expiry_description;
8281 }
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php
@@ -16,7 +16,6 @@
1717 public function showList( $msg = '' ) {
1818 global $wgOut, $wgRequest;
1919
20 - $wgOut->setPagetitle( wfMsg( "protectedpages" ) );
2120 if ( "" != $msg ) {
2221 $wgOut->setSubtitle( $msg );
2322 }
@@ -84,7 +83,7 @@
8584 if ( $row->pr_expiry != 'infinity' && strlen($row->pr_expiry) ) {
8685 $expiry = Block::decodeExpiry( $row->pr_expiry );
8786
88 - $expiry_description = wfMsgForContent( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) );
 87+ $expiry_description = wfMsg( 'protect-expiring' , $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) );
8988
9089 $description_items[] = $expiry_description;
9190 }

Status & tagging log