r109254 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109253‎ | r109254 | r109255 >
Date:00:06, 18 January 2012
Author:gregchiasson
Status:resolved (Comments)
Tags:aft 
Comment:
AFT5 - short circuit gender thing for the time being, so we can test the layout. Known issue, will fix
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -258,16 +258,21 @@
259259 private function renderBucket1( $record ) {
260260 $name = htmlspecialchars( $record[0]->user_name );
261261 if ( $record['found']->aa_response_boolean ) {
262 - $found = wfMessage(
263 - 'articlefeedbackv5-form1-header-found',
264 - $name
265 - )->escaped();
 262+ $msg = 'articlefeedbackv5-form1-header-found';
 263+ $class = 'positive';
266264 } else {
267 - $found = wfMessage(
268 - 'articlefeedbackv5-form1-header-not-found',
269 - $name
270 - )->escaped();
 265+ $msg = 'articlefeedbackv5-form1-header-not-found';
 266+ $class = 'negative';
271267 }
 268+ $found = Html::openElement( 'h3' )
 269+ . Html::element( 'a', array(
 270+ 'href' => '#',
 271+ ), $name )
 272+ .Html::element( 'span', array(
 273+ 'class' => $class,
 274+ ), wfMessage( $msg, '')->escaped() )
 275+ . Html::closeElement( 'h3' );
 276+
272277 return "$found
273278 <blockquote>" . htmlspecialchars( $record['comment']->aa_response_text )
274279 . '</blockquote>';

Follow-up revisions

RevisionCommit summaryAuthorDate
r110068AFT5:...gregchiasson19:23, 26 January 2012

Comments

#Comment by Catrope (talk | contribs)   01:33, 26 January 2012
+		.Html::element( 'span', array(
+			'class' => $class,
+		), wfMessage( $msg, '')->escaped() )

This'll double-escape the message, because element() already escapes its third argument.

OK otherwise.

Status & tagging log