Changeset 1672
- Timestamp:
- 01/04/08 14:39:15 (6 months ago)
- Files:
-
- trunk/system/i18n/en_US/validation.php (modified) (1 diff)
- trunk/system/i18n/nl_NL/validation.php (modified) (1 diff)
- trunk/system/libraries/Input.php (modified) (2 diffs)
- trunk/system/libraries/URI.php (modified) (6 diffs)
- trunk/system/libraries/Validation.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/system/i18n/en_US/validation.php
r1522 r1672 29 29 'max_width' => 'The %s file has a maximum allowed width of %s is %spx.', 30 30 'max_height' => 'The %s file has a maximum allowed image height of %s is %spx.', 31 32 // Field types 33 'alpha' => 'alphabetical', 34 'alpha_dash' => 'alphabetical, dash, and underscore', 35 'digit' => 'digit', 36 'numeric' => 'numeric', 31 37 ); trunk/system/i18n/nl_NL/validation.php
r1524 r1672 29 29 'max_width' => 'Het %s bestand heeft een maximum toegelaten breedte van %spx.', 30 30 'max_height' => 'Het %s bestand heeft een maximum toegelaten hoogte van %spx.', 31 32 // Field types 33 'alpha' => 'alfabetisch', 34 'alpha_dash' => 'alfabetisch, streepje, en underscore', 35 'digit' => 'cijfers', 36 'numeric' => 'getal', 31 37 ); trunk/system/libraries/Input.php
r1630 r1672 172 172 173 173 // Return the global value 174 return $return_array? $data : current($data);174 return ($return_array) ? $data : current($data); 175 175 } 176 176 … … 347 347 return $data; 348 348 } 349 349 350 350 // It is a string 351 351 $string = $data; trunk/system/libraries/URI.php
r1664 r1672 69 69 return isset(self::$rsegments[$index]) ? self::$rsegments[$index] : $default; 70 70 } 71 71 72 72 /** 73 73 * Method: argument … … 156 156 return $segment_array_assoc; 157 157 } 158 158 159 159 /** 160 160 * Method: argument_array … … 186 186 return $argument_array_assoc; 187 187 } 188 188 189 189 /** 190 190 * Method: string … … 234 234 return count(self::$rsegments); 235 235 } 236 236 237 237 /** 238 238 * Method: total_arguments … … 258 258 if ($this->total_segments() < 1) 259 259 return $default; 260 260 261 261 return end(self::$segments); 262 262 } … … 273 273 if ($this->total_rsegments() < 1) 274 274 return $default; 275 275 276 276 return end(self::$rsegments); 277 277 } trunk/system/libraries/Validation.php
r1646 r1672 936 936 return TRUE; 937 937 938 $this->add_error('valid_type', $this->current_field, 'alphabetical');938 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 939 939 return FALSE; 940 940 } … … 955 955 return TRUE; 956 956 957 $this->add_error('valid_type', $this->current_field, 'alphabetical');957 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 958 958 return FALSE; 959 959 } … … 974 974 return TRUE; 975 975 976 $this->add_error('valid_type', $this->current_field, 'alphabetical');976 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 977 977 return FALSE; 978 978 } … … 993 993 return TRUE; 994 994 995 $this->add_error('valid_type', $this->current_field, 'alphabetical');995 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha')); 996 996 return FALSE; 997 997 } … … 1012 1012 return TRUE; 1013 1013 1014 $this->add_error('valid_type', $this->current_field, 'alphabetical, dash, and underscore');1014 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha_dash')); 1015 1015 return FALSE; 1016 1016 } … … 1031 1031 return TRUE; 1032 1032 1033 $this->add_error('valid_type', $this->current_field, 'alphabetical, dash, and underscore');1033 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.alpha_dash')); 1034 1034 return FALSE; 1035 1035 } … … 1050 1050 return TRUE; 1051 1051 1052 $this->add_error('valid_type', $this->current_field, 'digit');1052 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.digit')); 1053 1053 return FALSE; 1054 1054 } … … 1069 1069 return TRUE; 1070 1070 1071 $this->add_error('valid_type', $this->current_field, 'digit');1071 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.digit')); 1072 1072 return FALSE; 1073 1073 } … … 1088 1088 return TRUE; 1089 1089 1090 $this->add_error('valid_type', $this->current_field, 'numeric');1090 $this->add_error('valid_type', $this->current_field, Kohana::lang('validation.numeric')); 1091 1091 return FALSE; 1092 1092 }
