r72588 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72587‎ | r72588 | r72589 >
Date:16:14, 8 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r72507
Modified paths:
  • /trunk/extensions/Validator/includes/ListParameter.php (modified) (history)
  • /trunk/extensions/Validator/includes/Parameter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ListParameter.php
@@ -93,6 +93,21 @@
9494 public function isList() {
9595 return true;
9696 }
 97+
 98+ /**
 99+ * Sets the $value to a cleaned value of $originalValue.
 100+ *
 101+ * @since 0.4
 102+ */
 103+ protected function cleanValue() {
 104+ $this->value = explode( $this->delimiter, $this->originalValue );
 105+
 106+ if ( $this->lowerCaseValue ) {
 107+ foreach ( $this->value as &$item ) {
 108+ $item = strtolower( $this->value );
 109+ }
 110+ }
 111+ }
97112
98113 /**
99114 * Validates all items in the list.
Index: trunk/extensions/Validator/includes/Parameter.php
@@ -176,9 +176,8 @@
177177 $delimiter = $definition['type'][2];
178178 }
179179 }
180 - else {
181 - $type = $definition['type'][0];
182 - }
 180+
 181+ $type = $definition['type'][0];
183182 }
184183 else {
185184 $type = $definition['type'];

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72507Work on ListParameter classjeroendedauw20:04, 6 September 2010

Status & tagging log