Changeset 2593 for trunk/modules/forge/libraries
- Timestamp:
- 04/28/2008 03:04:22 PM (5 months ago)
- Location:
- trunk/modules/forge/libraries
- Files:
-
- 5 modified
-
Forge.php (modified) (5 diffs)
-
Form_Checklist.php (modified) (3 diffs)
-
Form_Dateselect.php (modified) (1 diff)
-
Form_Input.php (modified) (8 diffs)
-
Form_Phonenumber.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/forge/libraries/Forge.php
r2460 r2593 88 88 89 89 // Create the input 90 switch (count($args))90 switch (count($args)) 91 91 { 92 92 case 1: … … 155 155 { 156 156 $status = TRUE; 157 foreach ($this->inputs as $input)157 foreach ($this->inputs as $input) 158 158 { 159 159 if ($input->validate() == FALSE) … … 174 174 { 175 175 $data = array(); 176 foreach (array_merge($this->hidden, $this->inputs) as $input)176 foreach (array_merge($this->hidden, $this->inputs) as $input) 177 177 { 178 178 if (is_object($input->name)) // It's a Forge_Group object (hopefully) … … 251 251 if (is_array($errors) AND ! empty($errors)) 252 252 { 253 foreach ($errors as $error)253 foreach ($errors as $error) 254 254 { 255 255 // Replace the message with the error in the html error string … … 271 271 if ( ! empty($this->hidden)) 272 272 { 273 foreach ($this->hidden as $input)273 foreach ($this->hidden as $input) 274 274 { 275 275 $hidden[$input->name] = $input->value; -
trunk/modules/forge/libraries/Form_Checklist.php
r2022 r2593 33 33 // Return the currently checked values 34 34 $array = array(); 35 foreach ($this->data['options'] as $id => $opt)35 foreach ($this->data['options'] as $id => $opt) 36 36 { 37 37 // Return the options that are checked … … 56 56 57 57 $checklist = '<ul class="'.arr::remove('class', $base_data).'">'.$nl; 58 foreach (arr::remove('options', $base_data) as $val => $opt)58 foreach (arr::remove('options', $base_data) as $val => $opt) 59 59 { 60 60 // New set of input data … … 77 77 protected function load_value() 78 78 { 79 foreach ($this->data['options'] as $val => $checked)79 foreach ($this->data['options'] as $val => $checked) 80 80 { 81 81 if ($input = $this->input_value($this->data['name'])) -
trunk/modules/forge/libraries/Form_Dateselect.php
r1923 r2593 66 66 67 67 $input = ''; 68 foreach ($this->parts as $type => $val)68 foreach ($this->parts as $type => $val) 69 69 { 70 70 if (is_int($type)) -
trunk/modules/forge/libraries/Form_Input.php
r2362 r2593 221 221 } 222 222 223 foreach ($rules as $rule)223 foreach ($rules as $rule) 224 224 { 225 225 if ($action === '-') … … 306 306 307 307 $messages = array(); 308 foreach ($this->errors as $func => $args)308 foreach ($this->errors as $func => $args) 309 309 { 310 310 if (is_string($args)) … … 328 328 { 329 329 // Get the proper i18n entry, very hacky but it works 330 switch ($func)330 switch ($func) 331 331 { 332 332 case 'valid_url': … … 428 428 if ( ! empty($this->rules)) 429 429 { 430 foreach ($this->rules as $rule)430 foreach ($this->rules as $rule) 431 431 { 432 432 if (($offset = strpos($rule, '[')) !== FALSE) … … 456 456 { 457 457 // Manually call up to 2 args for speed 458 switch (count($args))458 switch (count($args)) 459 459 { 460 460 case 1: … … 491 491 if ( ! empty($this->matches)) 492 492 { 493 foreach ($this->matches as $input)493 foreach ($this->matches as $input) 494 494 { 495 495 if ($this->value != $input->value) … … 504 504 if ( ! empty($this->callbacks)) 505 505 { 506 foreach ($this->callbacks as $callback)506 foreach ($this->callbacks as $callback) 507 507 { 508 508 call_user_func($callback, $this); … … 551 551 $this->errors['min_length'] = array($min); 552 552 } 553 elseif ($length > $max)553 elseif ($length > $max) 554 554 { 555 555 $this->errors['max_length'] = array($max); -
trunk/modules/forge/libraries/Form_Phonenumber.php
r2222 r2593 52 52 53 53 $input = ''; 54 foreach ($this->parts as $type => $val)54 foreach ($this->parts as $type => $val) 55 55 { 56 56 isset($data['value']) OR $data['value'] = '';
