summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/MY_ORM.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries/MY_ORM.php')
-rw-r--r--modules/gallery/libraries/MY_ORM.php20
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;
}
}