r81397 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81396‎ | r81397 | r81398 >
Date:15:44, 2 February 2011
Author:btongminh
Status:ok
Tags:
Comment:
Follow-up r77640: Check whether there are errors before asking Status to transform them into wikitext.
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -509,7 +509,11 @@
510510 function getErrors( $errors ) {
511511 if ( $errors instanceof Status ) {
512512 global $wgOut;
513 - $errorstr = $wgOut->parse( $errors->getWikiText() );
 513+ if ( $errors->isOK() ) {
 514+ $errorstr = '';
 515+ } else {
 516+ $errorstr = $wgOut->parse( $errors->getWikiText() );
 517+ }
514518 } elseif ( is_array( $errors ) ) {
515519 $errorstr = $this->formatErrors( $errors );
516520 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r814131.17: MFT r78395, r79968, r81311, r81313, r81349, r81352, r81376, r81389, r81...catrope20:45, 2 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77640Allow the submit callback function to return a Status object (will use this l...ialex11:29, 3 December 2010

Status & tagging log