r58058 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58057‎ | r58058 | r58059 >
Date:18:07, 23 October 2009
Author:siebrand
Status:ok
Tags:
Comment:
Follow-up to r58057
* format numbers
* change parseinline to parse
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -313,21 +313,22 @@
314314 foreach( $runs as $run ) {
315315 $html .= "<h3>" . htmlspecialchars( $run->suite->name ) . "</h3>\n";
316316 if( $run->status == 'complete' ) {
 317+ global $wgLang;
 318+
317319 $total = $run->countTotal;
318320 $success = $run->countSuccess;
319321 $failed = $total - $success;
320 - $success_tests = "<span class='mw-codereview-success'>$success</span>";
 322+ $success_tests = "<span class='mw-codereview-success'>" . $wgLang->formatNum( $success ) . "</span>";
321323 if( $failed ) {
322 - $failed_tests = "<span class='mw-codereview-fail'>$failed</span>";
323 - $html .= "<p>" .
324 - wfMsgExt(
325 - 'codereview-tests-failed2',
326 - 'parseinline',
327 - $success_tests,
328 - $success,
329 - $failed_tests,
330 - $failed
331 - ) . "</p>";
 324+ $failed_tests = "<span class='mw-codereview-fail'>" . $wgLang->formatNum( $failed ) . "</span>";
 325+ $html .= wfMsgExt(
 326+ 'codereview-tests-failed2',
 327+ 'parse',
 328+ $success_tests,
 329+ $success,
 330+ $failed_tests,
 331+ $failed
 332+ );
332333
333334 $tests = $run->getResults( false );
334335 $html .= "<ul>\n";
@@ -336,13 +337,12 @@
337338 }
338339 $html .= "</ul>\n";
339340 } else {
340 - $html .= "<p>" .
341 - wfMsgExt(
342 - 'codereview-tests-succeeded2',
343 - 'parseinline',
344 - $success_tests,
345 - $success
346 - ) . "</p>";
 341+ $html .= wfMsgExt(
 342+ 'codereview-tests-succeeded2',
 343+ 'parseinline',
 344+ $success_tests,
 345+ $success
 346+ );
347347 }
348348 } elseif( $run->status == "running" ) {
349349 $html .= wfMsgExt('codereview-tests-running','parse');

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58057Remove lego in success/fail reporting of tests.siebrand17:56, 23 October 2009

Status & tagging log