diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 12:51:27 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-07-17 12:51:27 -0700 |
| commit | cd907c2b42f8b50ebe6d490aab42365e16deb258 (patch) | |
| tree | b58350f7d7ffebeb91d5d9d2f273c0561625664b /modules/gallery/libraries | |
| parent | 8a6556b30bc34d69284df6246f4010a8835f3bc2 (diff) | |
Change model_cache::clear() API to clear everything. This prevents
old ORM relationships from hanging around, which was causing problems
when doing MPTT manipulations (resulting in incorrect permission
propagation-- very bad!)
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/MY_ORM.php | 2 | ||||
| -rw-r--r-- | modules/gallery/libraries/ORM_MPTT.php | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/gallery/libraries/MY_ORM.php b/modules/gallery/libraries/MY_ORM.php index 319cbe09..1d3c1ef3 100644 --- a/modules/gallery/libraries/MY_ORM.php +++ b/modules/gallery/libraries/MY_ORM.php @@ -32,7 +32,7 @@ class ORM extends ORM_Core { } public function save() { - model_cache::clear($this->object_name, $this->{$this->primary_key}, $this->primary_key); + model_cache::clear(); $result = parent::save(); $this->original = $this->object; return $result; diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 46280d95..e371f159 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -285,6 +285,7 @@ class ORM_MPTT_Core extends ORM { // Lets reload to get the changes. $this->reload(); + $target->reload(); return $this; } |
