summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-20 22:56:37 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-20 22:56:37 -0800
commitf6c48d757c8f95249e58280e93c99aa4a6f217b1 (patch)
tree0dfeb7e741522c917ee0881194a50844602ab7be
parentb0ff4418d2d56be5eb6ac5b26255dc8a40404806 (diff)
Delete MY_ORM::original(). We did not have proper containment to
generate $original when we needed it, resulting in inconsistent behavior.
-rw-r--r--modules/gallery/libraries/MY_ORM.php33
1 files changed, 0 insertions, 33 deletions
diff --git a/modules/gallery/libraries/MY_ORM.php b/modules/gallery/libraries/MY_ORM.php
index 8c0f084f..102b21f0 100644
--- a/modules/gallery/libraries/MY_ORM.php
+++ b/modules/gallery/libraries/MY_ORM.php
@@ -18,42 +18,9 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class ORM extends ORM_Core {
- // Track the original value of this ORM so that we can look it up in ORM::original()
- protected $original = null;
-
public function save() {
model_cache::clear();
$result = parent::save();
- $this->original = clone $this;
- return $result;
- }
-
- public function __set($column, $value) {
- if (!isset($this->original)) {
- $this->original = clone $this;
- }
-
- if ($value instanceof SafeString) {
- $value = $value->unescaped();
- }
-
- return parent::__set($column, $value);
- }
-
- public function __unset($column) {
- if (!isset($this->original)) {
- $this->original = clone $this;
- }
-
- return parent::__unset($column);
- }
-
- public function original() {
- if (!isset($this->original)) {
- $this->original = clone $this;
- }
-
- return $this->original;
}
}