r38217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38216‎ | r38217 | r38218 >
Date:05:30, 30 July 2008
Author:aaron
Status:old
Tags:
Comment:
Improve and use getTagMsg()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -1340,7 +1340,7 @@
13411341 }
13421342 $quantity = count( $label );
13431343 $form .= Xml::openElement( 'span', array('class' => 'fr-rating-options') ) . "\n";
1344 - $form .= "<b>" . wfMsgHtml("revreview-$quality") . ":</b>&nbsp;";
 1344+ $form .= "<b>" . FlaggedRevs::getTagMsg($quality) . ":</b>&nbsp;";
13451345 # If the sum of qualities of all flags is above 6, use drop down boxes
13461346 # 6 is an arbitrary value choosen according to screen space and usability
13471347 if( $size > 6 ) {
@@ -1348,15 +1348,14 @@
13491349 $form .= Xml::openElement( 'select', $attribs );
13501350 foreach( $label as $i => $name ) {
13511351 $optionClass = array( 'class' => "fr-rating-option-$i" );
1352 - $form .= Xml::option( wfMsg( "revreview-$name" ), $i, ($i == $selected), $optionClass )
1353 - ."\n";
 1352+ $form .= Xml::option( FlaggedRevs::getTagMsg($name), $i, ($i == $selected), $optionClass )."\n";
13541353 }
13551354 $form .= Xml::closeElement('select')."\n";
13561355 # If there are more than two qualities (none, 1 and more) current user gets radio buttons
13571356 } else if( $quantity > 2 ) {
13581357 foreach( $label as $i => $name ) {
13591358 $attribs = array( 'class' => "fr-rating-option-$i", 'onchange' => "updateRatingForm()" );
1360 - $form .= Xml::radioLabel( wfMsg( "revreview-$name" ), "wp$quality", $i, "wp$quality".$i,
 1359+ $form .= Xml::radioLabel( FlaggedRevs::getTagMsg($name), "wp$quality", $i, "wp$quality".$i,
13611360 ($i == $selected), $attribs ) . "\n";
13621361 }
13631362 # Otherwise make checkboxes (two qualities available for current user
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -180,7 +180,7 @@
181181 */
182182 public static function getTagMsg( $tag ) {
183183 self::load();
184 - return "revreview-$tag";
 184+ return wfMsgHtml("revreview-$tag");
185185 }
186186
187187 /**

Status & tagging log