Changeset 674

Show
Ignore:
Timestamp:
10/06/2007 11:37:39 AM (14 months ago)
Author:
Shadowhand
Message:

Added validation finished Events (validation.success and validation.failure)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Validation.php

    r644 r674  
    353353                } 
    354354 
    355                 // i haz error? 
    356                 return (count($this->errors) == 0); 
     355                // Run validation finished Event and return 
     356                if (count($this->errors) == 0) 
     357                { 
     358                        Event::run('validation.success'); 
     359                        return TRUE; 
     360                } 
     361                else 
     362                { 
     363                        Event::run('validation.failure'); 
     364                        return FALSE; 
     365                } 
    357366        } 
    358367 
     
    525534 
    526535                move_uploaded_file($data['tmp_name'], $filename); 
    527                 chmod($filename, 0644); 
     536 
     537                $this->data[$this->current_field] = $filename; 
     538 
     539                return TRUE; 
    528540        } 
    529541