Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | 'articlefeedbackv5-discussion-page' => 'Talk', |
115 | 115 | 'articlefeedbackv5-whats-this' => 'Help', |
116 | 116 | 'articlefeedbackv5-invalid-page-id' => 'Invalid page ID', |
117 | | - 'articlefeedbackv5-percent-found' => '<span class="stat-marker positive">$1%</span> found what they were looking for', |
| 117 | + 'articlefeedbackv5-percent-found' => '$1 found what they were looking for', |
118 | 118 | 'articlefeedbackv5-overall-rating' => 'Rating: $1/5', |
119 | 119 | 'articlefeedbackv5-special-title' => '==Feedback==', |
120 | 120 | 'articleFeedbackv5-table-caption-dailyhighsandlows' => 'Today\'s highs and lows', |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -296,6 +296,7 @@ |
297 | 297 | // Taken from the Moodbar extension. |
298 | 298 | $now = wfTimestamp( TS_UNIX ); |
299 | 299 | $timestamp = wfTimestamp( TS_UNIX, $record[0]->af_created ); |
| 300 | + $date; |
300 | 301 | |
301 | 302 | // Relative dates for 48 hours, normal timestamps later. |
302 | 303 | if( $timestamp > ( $now - ( 86400 * 2 ) ) ) { |
— | — | @@ -305,7 +306,6 @@ |
306 | 307 | $date = wfMessage( 'articleFeedbackv5-comment-ago', $time )->escaped(); |
307 | 308 | } elseif( $timestamp ) { |
308 | 309 | $date = $wgLang->timeanddate($record[0]->af_created ); |
309 | | - } else { |
310 | 310 | } |
311 | 311 | |
312 | 312 | $details = Html::openElement( 'div', array( |
— | — | @@ -327,7 +327,7 @@ |
328 | 328 | if( $record[0]->age > 0 ) { |
329 | 329 | $details .= Linker::link( |
330 | 330 | Title::newFromText( $record[0]->page_title ), |
331 | | - wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age )->text(), |
| 331 | + wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age )->escaped(), |
332 | 332 | array(), |
333 | 333 | array( |
334 | 334 | 'action' => 'historysubmit', |
— | — | @@ -602,7 +602,7 @@ |
603 | 603 | . Html::element( 'span', array( 'class' => 'icon' ) ) |
604 | 604 | . Html::element( 'span', |
605 | 605 | array( 'class' => 'result' ), |
606 | | - wfMessage( $message, $gender, $extra ) |
| 606 | + wfMessage( $message, $gender, $extra )->text() |
607 | 607 | ) |
608 | 608 | . Html::closeElement( 'h3' ); |
609 | 609 | } |
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php |
— | — | @@ -137,12 +137,14 @@ |
138 | 138 | ); |
139 | 139 | |
140 | 140 | if ( $found ) { |
| 141 | + $class = $found > 50 ? 'positive' : 'negative'; |
| 142 | + $span = "<span class='stat-marker $class'>$found%</span>"; |
141 | 143 | $out->addHtml( |
142 | 144 | Html::openElement( |
143 | 145 | 'div', |
144 | 146 | array( 'id' => 'articleFeedbackv5-percent-found-wrap' ) |
145 | 147 | ) |
146 | | - . $this->msg( 'articlefeedbackv5-percent-found', $found )->plain() # Can't escape this, need the <span> tag to parse. |
| 148 | + . $this->msg( 'articlefeedbackv5-percent-found' )->rawParams( $span )->escaped() |
147 | 149 | . Html::closeElement( 'div' ) |
148 | 150 | ); |
149 | 151 | } |