diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-16 00:15:23 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-16 00:15:23 -0800 |
commit | 434d351b2f0fc2a048f561665cb1d828d1126f9c (patch) | |
tree | 12b23d33fecf0e5b053a79ed1bf3b8a604c98372 /modules/gallery/libraries | |
parent | 654b103355f1bda15246e651fa91f3c9e08c3901 (diff) | |
parent | dcf4b5e71ae8a097f133a06485d60c5fb3400824 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
modules/gallery/models/item.php
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r-- | modules/gallery/libraries/MY_ORM.php | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/modules/gallery/libraries/MY_ORM.php b/modules/gallery/libraries/MY_ORM.php index 1bf5dd13..56c776aa 100644 --- a/modules/gallery/libraries/MY_ORM.php +++ b/modules/gallery/libraries/MY_ORM.php @@ -19,11 +19,12 @@ */ class ORM extends ORM_Core { // Track the original value of this ORM so that we can look it up in ORM::original() - protected $original; + protected $original = null; public function save() { model_cache::clear(); $result = parent::save(); + $this->original = clone $this; return $result; } @@ -47,24 +48,7 @@ class ORM extends ORM_Core { return parent::__unset($column); } - public function reload($reload_all=true) { - if ($reload_all) { - parent::reload(); - } - $this->original = clone $this; - return $this; - } - - public function clear() { - parent::clear(); - $this->original = clone $this; - return $this; - } - public function original() { - if (!isset($this->original)) { - $this->original = clone $this; - } return $this->original; } } |