r61738 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61737‎ | r61738 | r61739 >
Date:02:59, 31 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
0.2.1 rc1
Modified paths:
  • /trunk/extensions/Validator/Validator.php (modified) (history)
  • /trunk/extensions/Validator/Validator_Functions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Validator/Validator_Functions.php
@@ -23,7 +23,7 @@
2424 final class ValidatorFunctions {
2525
2626 /**
27 - * Returns whether the provided value, which must be a number, is within a certain range. Upper bound not included.
 27+ * Returns whether the provided value, which must be a number, is within a certain range. Upper bound included.
2828 *
2929 * @param $value
3030 * @param $lower
@@ -35,7 +35,7 @@
3636 if ( ! is_numeric( $value ) ) return false;
3737 $value = (int)$value;
3838 if ($lower !== false && $value < $lower) return false;
39 - if ($upper !== false && $value >= $upper) return false;
 39+ if ($upper !== false && $value > $upper) return false;
4040 return true;
4141 }
4242
@@ -76,7 +76,7 @@
7777 }
7878
7979 /**
80 - * Returns whether the length of the value is within a certain range. Upper bound not included.
 80+ * Returns whether the length of the value is within a certain range. Upper bound included.
8181 *
8282 * @param string $value
8383 * @param $lower
@@ -89,7 +89,7 @@
9090 }
9191
9292 /**
93 - * Returns whether the amount of items in the list is within a certain range. Upper bound not included.
 93+ * Returns whether the amount of items in the list is within a certain range. Upper bound included.
9494 *
9595 * @param array $values
9696 * @param $lower
Index: trunk/extensions/Validator/Validator.php
@@ -24,7 +24,7 @@
2525 die( 'Not an entry point.' );
2626 }
2727
28 -define( 'Validator_VERSION', '0.2.1 a1' );
 28+define( 'Validator_VERSION', '0.2.1 rc1' );
2929
3030 // Constants indicating the strictness of the parameter validation.
3131 define( 'Validator_ERRORS_NONE', 0 );

Status & tagging log