r72282 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72281‎ | r72282 | r72283 >
Date:13:00, 3 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.4 - follow up to r72281
Modified paths:
  • /trunk/extensions/Validator/includes/Validator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/Validator.php
@@ -547,27 +547,16 @@
548548 $hasNoErrors = false;
549549
550550 $this->registerError(
551 - 'Demo: List error invamid',
552 - /* TODO
553 - wfMsgExt(
554 - 'validator_error_required_missing',
555 - 'parsemag',
556 - $paramName
 551+ $this->getCriteriaErrorMessage(
 552+ $criteriaName,
 553+ $this->mParameters[$name]['original-name'],
 554+ $this->mParameters[$name]['original-value'],
 555+ $criteriaArgs,
 556+ true
557557 ),
558 - */
559558 $criteriaName
560 - );
 559+ );
561560
562 - /*
563 - $this->mErrors[] = array(
564 - 'type' => ,
565 - 'args' => $criteriaArgs,
566 - 'name' => $this->mParameters[$name]['original-name'],
567 - 'list' => true,
568 - 'value' => $this->mParameters[$name]['original-value']
569 - );
570 - */
571 -
572561 if ( !self::$accumulateParameterErrors ) {
573562 break;
574563 }
@@ -635,26 +624,16 @@
636625 $value = $validItems;
637626
638627 $this->registerError(
639 - 'Demo: Invalid item in list',
640 - /* TODO
641 - wfMsgExt(
642 - 'validator_error_required_missing',
643 - 'parsemag',
644 - $paramName
 628+ $this->getCriteriaErrorMessage(
 629+ $criteriaName,
 630+ $this->mParameters[$name]['original-name'],
 631+ $this->mParameters[$name]['original-value'],
 632+ $criteriaArgs,
 633+ true,
 634+ $invalidItems
645635 ),
646 - */
647636 $criteriaName
648 - );
649 -
650 - /*
651 - $this->mErrors[] = array(
652 - 'type' => $criteriaName,
653 - 'args' => $criteriaArgs,
654 - 'name' => $this->mParameters[$name]['original-name'],
655 - 'list' => true,
656 - 'invalid-items' => $invalidItems
657 - );
658 - */
 637+ );
659638 }
660639 }
661640 }
@@ -666,26 +645,15 @@
667646 // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated.
668647 if ( !$isValid ) {
669648 $this->registerError(
670 - 'Demo: parameter validation failed',
671 - /* TODO
672 - wfMsgExt(
673 - 'validator_error_required_missing',
674 - 'parsemag',
675 - $paramName
 649+ $this->getCriteriaErrorMessage(
 650+ $criteriaName,
 651+ $this->mParameters[$name]['original-name'],
 652+ $this->mParameters[$name]['original-value'],
 653+ $criteriaArgs,
 654+ is_array( $value )
676655 ),
677 - */
678656 $criteriaName
679 - );
680 -
681 - /*
682 - $this->mErrors[] = array(
683 - 'type' => $criteriaName,
684 - 'args' => $criteriaArgs,
685 - 'name' => $this->mParameters[$name]['original-name'],
686 - 'list' => is_array( $value ),
687 - 'value' => $this->mParameters[$name]['original-value']
688 - );
689 - */
 657+ );
690658
691659 $hasNoErrors = false;
692660 if ( !self::$accumulateParameterErrors ) break;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72281Changes for 0.4 - implemented criteria validation error message methodjeroendedauw12:54, 3 September 2010

Status & tagging log