Index: trunk/extensions/Validator/RELEASE-NOTES |
— | — | @@ -4,6 +4,18 @@ |
5 | 5 | This change log contains a list of completed to-do's (new features, bug fixes, refactoring) for every version of Validator. |
6 | 6 | |
7 | 7 | |
| 8 | +=== Validator 0.4.6 === |
| 9 | +(2011-05-xx) |
| 10 | + |
| 11 | +* Added ParameterInput class to generate HTML inputs for parameters, based on code from SMWs Special:Ask. |
| 12 | + |
| 13 | +* Removed ParamManipulationBoolstr |
| 14 | + |
| 15 | +* Added "$manipulate = true" as second parameter for Parameter::setDefault, |
| 16 | + which gets passed to Parameter::setDoManipulationOfDefault. |
| 17 | + |
| 18 | +* Boolean manipulation now ignores values that are already a boolean. |
| 19 | + |
8 | 20 | === Validator 0.4.5 === |
9 | 21 | (2011-03-05) |
10 | 22 | |
Index: trunk/extensions/Validator/includes/ListParameterCriterion.php |
— | — | @@ -13,7 +13,8 @@ |
14 | 14 | * @ingroup Validator |
15 | 15 | * @ingroup Criteria |
16 | 16 | * |
17 | | - * @author Jeroen De Dauw |
| 17 | + * @licence GNU GPL v3 or later |
| 18 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
18 | 19 | */ |
19 | 20 | abstract class ListParameterCriterion extends ParameterCriterion { |
20 | 21 | |
Index: trunk/extensions/Validator/includes/ListParameterManipulation.php |
— | — | @@ -11,7 +11,8 @@ |
12 | 12 | * @ingroup Validator |
13 | 13 | * @ingroup ParameterManipulations |
14 | 14 | * |
15 | | - * @author Jeroen De Dauw |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
16 | 17 | */ |
17 | 18 | abstract class ListParameterManipulation extends ParameterManipulation { |
18 | 19 | |
Index: trunk/extensions/Validator/includes/ParameterCriterion.php |
— | — | @@ -9,7 +9,8 @@ |
10 | 10 | * @ingroup Validator |
11 | 11 | * @ingroup Criteria |
12 | 12 | * |
13 | | - * @author Jeroen De Dauw |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 15 | */ |
15 | 16 | abstract class ParameterCriterion { |
16 | 17 | |
Index: trunk/extensions/Validator/includes/ParameterInput.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | * @ingroup Validator |
17 | 17 | * |
18 | 18 | * @licence GNU GPL v3 or later |
19 | | - * @author Jeroen De Dauw |
| 19 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
20 | 20 | */ |
21 | 21 | class ParameterInput { |
22 | 22 | |
Index: trunk/extensions/Validator/includes/ParameterManipulation.php |
— | — | @@ -9,7 +9,8 @@ |
10 | 10 | * @ingroup Validator |
11 | 11 | * @ingroup ParameterManipulations |
12 | 12 | * |
13 | | - * @author Jeroen De Dauw |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 15 | */ |
15 | 16 | abstract class ParameterManipulation { |
16 | 17 | |
Index: trunk/extensions/Validator/includes/ValidationErrorHandler.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file Validator_ErrorHandler.php |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | final class ValidationErrorHandler { |
15 | 16 | |
Index: trunk/extensions/Validator/includes/ValidationError.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file Validator_Error.php |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class ValidationError { |
15 | 16 | |
Index: trunk/extensions/Validator/includes/CriterionValidationResult.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file CriterionValidationResult.php |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class CriterionValidationResult { |
15 | 16 | |
— | — | @@ -80,7 +81,7 @@ |
81 | 82 | } |
82 | 83 | |
83 | 84 | /** |
84 | | - * Returns whether no errors occured. |
| 85 | + * Returns whether no errors occurred. |
85 | 86 | * |
86 | 87 | * @since 0.4 |
87 | 88 | * |
Index: trunk/extensions/Validator/includes/ListParameter.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file ListParameter.php |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class ListParameter extends Parameter { |
15 | 16 | |
Index: trunk/extensions/Validator/includes/ParserHook.php |
— | — | @@ -9,7 +9,8 @@ |
10 | 10 | * @file ParserHook.php |
11 | 11 | * @ingroup Validator |
12 | 12 | * |
13 | | - * @author Jeroen De Dauw |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 15 | */ |
15 | 16 | abstract class ParserHook { |
16 | 17 | |
Index: trunk/extensions/Validator/includes/ItemParameterCriterion.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Item parameter criterion definition class. This is for criteria |
6 | | - * that apply to indivudial values, which can either be the whole value |
| 6 | + * that apply to individual values, which can either be the whole value |
7 | 7 | * of a non-list parameter, or a single item of a list parameter. |
8 | 8 | * |
9 | 9 | * @since 0.4 |
— | — | @@ -11,7 +11,8 @@ |
12 | 12 | * @ingroup Validator |
13 | 13 | * @ingroup Criteria |
14 | 14 | * |
15 | | - * @author Jeroen De Dauw |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
16 | 17 | */ |
17 | 18 | abstract class ItemParameterCriterion extends ParameterCriterion { |
18 | 19 | |
Index: trunk/extensions/Validator/includes/ItemParameterManipulation.php |
— | — | @@ -11,7 +11,8 @@ |
12 | 12 | * @ingroup Validator |
13 | 13 | * @ingroup ParameterManipulations |
14 | 14 | * |
15 | | - * @author Jeroen De Dauw |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
16 | 17 | */ |
17 | 18 | abstract class ItemParameterManipulation extends ParameterManipulation { |
18 | 19 | |
Index: trunk/extensions/Validator/includes/Parameter.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file Parameter.php |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class Parameter { |
15 | 16 | |
Index: trunk/extensions/Validator/includes/Validator.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Class for parameter validation of a single parser hook or other parameterized construct. |
| 5 | + * Class for parameter validation of a single parser hook or other parametrized construct. |
6 | 6 | * |
7 | 7 | * @since 0.1 |
8 | 8 | * |
— | — | @@ -9,7 +9,6 @@ |
10 | 10 | * @ingroup Validator |
11 | 11 | * |
12 | 12 | * @licence GNU GPL v3 or later |
13 | | - * |
14 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 14 | */ |
16 | 15 | class Validator { |
— | — | @@ -409,6 +408,8 @@ |
410 | 409 | /** |
411 | 410 | * Returns the errors. |
412 | 411 | * |
| 412 | + * @since 0.4 |
| 413 | + * |
413 | 414 | * @return array of ValidationError |
414 | 415 | */ |
415 | 416 | public function getErrors() { |
— | — | @@ -416,6 +417,21 @@ |
417 | 418 | } |
418 | 419 | |
419 | 420 | /** |
| 421 | + * @since 0.4.6 |
| 422 | + * |
| 423 | + * @return array of string |
| 424 | + */ |
| 425 | + public function getErrorMessages() { |
| 426 | + $errors = array(); |
| 427 | + |
| 428 | + foreach ( $this->errors as $error ) { |
| 429 | + $errors[] = $error->getMessage(); |
| 430 | + } |
| 431 | + |
| 432 | + return $errors; |
| 433 | + } |
| 434 | + |
| 435 | + /** |
420 | 436 | * Returns if there where any errors during validation. |
421 | 437 | * |
422 | 438 | * @return boolean |
— | — | @@ -439,4 +455,4 @@ |
440 | 456 | return false; |
441 | 457 | } |
442 | 458 | |
443 | | -} |
\ No newline at end of file |
| 459 | +} |
Index: trunk/extensions/Validator/Validator.i18n.php |
— | — | @@ -6,7 +6,8 @@ |
7 | 7 | * @file Validator.i18n.php |
8 | 8 | * @ingroup Validator |
9 | 9 | * |
10 | | - * @author Jeroen De Dauw |
| 10 | + * @licence GNU GPL v3 or later |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
11 | 12 | */ |
12 | 13 | |
13 | 14 | $messages = array(); |
Index: trunk/extensions/Validator/Validator.php |
— | — | @@ -10,7 +10,6 @@ |
11 | 11 | * @ingroup Validator |
12 | 12 | * |
13 | 13 | * @licence GNU GPL v3 or later |
14 | | - * |
15 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
16 | 15 | */ |
17 | 16 | |
Index: trunk/extensions/Validator/Validator_Settings.php |
— | — | @@ -4,13 +4,14 @@ |
5 | 5 | * File defining the settings for the Validator extension |
6 | 6 | * |
7 | 7 | * NOTICE: |
8 | | - * Changing one of these settings can be done by copieng or cutting it, |
| 8 | + * Changing one of these settings can be done by copying or cutting it, |
9 | 9 | * and placing it in LocalSettings.php, AFTER the inclusion of Validator. |
10 | 10 | * |
11 | 11 | * @file Validator_Settings.php |
12 | 12 | * @ingroup Validator |
13 | 13 | * |
14 | | - * @author Jeroen De Dauw |
| 14 | + * @licence GNU GPL v3 or later |
| 15 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 16 | */ |
16 | 17 | |
17 | 18 | if ( !defined( 'MEDIAWIKI' ) ) { |