Show
Ignore:
Timestamp:
04/04/2008 02:19:34 PM (8 months ago)
Author:
Shadowhand
Message:

Minor tweaks to PDODB and PDO_Model

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/pdomo/models/pdo.php

    r2420 r2421  
    277277                        // Object is loaded and saved 
    278278                        $this->loaded = $this->saved = TRUE; 
     279 
     280                        // Execute the on_load event 
     281                        $this->__on_load(); 
    279282                } 
    280283                else 
     
    335338        public function find($key, $op = '######', $value = '######') 
    336339        { 
    337                 if ($value === '######') 
     340                if ($key === TRUE) 
     341                { 
     342                        // Reload the current record 
     343                        $key = $this->primary_key; 
     344                        $op = '='; 
     345                        $value = $this->data[$this->primary_key]; 
     346                } 
     347                elseif ($value === '######') 
    338348                { 
    339349                        if ($op === '######')