diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-04 11:42:37 -0800 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-04 11:42:37 -0800 |
| commit | 8ca69cffbba70fe22e19478f742a37bdbd758d83 (patch) | |
| tree | 712a69eef7d134d7ad2ea2668d30fda44914beff /modules/gallery/libraries/ORM_MPTT.php | |
| parent | 5743b159c28888f2165cc4269d3302fea24fde7a (diff) | |
| parent | 5c107be9033ae48f781c8430702458f613e791ee (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/libraries/ORM_MPTT.php')
| -rw-r--r-- | modules/gallery/libraries/ORM_MPTT.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 83d2445c..ebd7abc2 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -48,6 +48,7 @@ class ORM_MPTT_Core extends ORM { */ function add_to_parent($parent) { $this->lock(); + $parent->reload(); // Assume that the prior lock holder may have changed the parent try { // Make a hole in the parent for this new item @@ -91,6 +92,7 @@ class ORM_MPTT_Core extends ORM { } $this->lock(); + $this->reload(); // Assume that the prior lock holder may have changed this entry try { $this->db->query( "UPDATE {{$this->table_name}} SET `left_ptr` = `left_ptr` - 2 WHERE `left_ptr` > {$this->right_ptr}"); @@ -224,6 +226,8 @@ class ORM_MPTT_Core extends ORM { $level_delta = ($target->level + 1) - $this->level; $this->lock(); + $this->reload(); // Assume that the prior lock holder may have changed this entry + $target->reload(); try { if ($level_delta) { // Update the levels for the to-be-moved items |
