r85208 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85207‎ | r85208 | r85209 >
Date:20:12, 2 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r85201
Modified paths:
  • /trunk/extensions/Validator/includes/ParameterInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/includes/ParameterInput.php
@@ -49,7 +49,7 @@
5050 protected $inputName;
5151
5252 /**
53 - * COnstructor.
 53+ * Constructor.
5454 *
5555 * @since 0.4.6
5656 *
@@ -63,6 +63,17 @@
6464 }
6565
6666 /**
 67+ * Sets the current value.
 68+ *
 69+ * @since 0.4.6
 70+ *
 71+ * @param mixed $currentValue
 72+ */
 73+ public function setCurrentValue( $currentValue ) {
 74+ $this->currentValue = $currentValue;
 75+ }
 76+
 77+ /**
6778 * Sets the name for the input; defaults to the name of the parameter.
6879 *
6980 * @since 0.6.4
@@ -70,7 +81,7 @@
7182 * @param string $name
7283 */
7384 public function setInputName( $name ) {
74 - $this->inputName = name;
 85+ $this->inputName = $name;
7586 }
7687
7788 /**
@@ -96,7 +107,7 @@
97108 }
98109 else {
99110 switch ( $this->param->getType() ) {
100 - case Paramater::TYPE_CHAR:
 111+ case Parameter::TYPE_CHAR:
101112 case Parameter::TYPE_FLOAT:
102113 case Parameter::TYPE_INTEGER:
103114 case Parameter::TYPE_NUMBER:
@@ -104,9 +115,9 @@
105116 break;
106117 case Parameter::TYPE_BOOLEAN:
107118 $html = $this->getBooleanInput();
108 - case Paramater::TYPE_STRING:
 119+ case Parameter::TYPE_STRING:
109120 default:
110 - $html = $this->getIntInput();
 121+ $html = $this->getStrInput();
111122 break;
112123 }
113124 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r85212follow up to r85208jeroendedauw21:49, 2 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85201adding class to create html inputs based on param definitions for upcomming c...jeroendedauw17:17, 2 April 2011

Status & tagging log