summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/ORM_MPTT.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-05 17:56:31 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-05 17:56:31 -0800
commit62693db037729f18db42d3959c73e470d1b106f1 (patch)
treecb4eccc050afeb635b7308fef097dc6ac0912eb4 /modules/gallery/libraries/ORM_MPTT.php
parentc7b934bc6daf41af1b6e0b04b9b0e9cb22113db6 (diff)
parentfcbf824c05a7ba61391c0b5afc1589436490e7ba (diff)
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/gallery/libraries/ORM_MPTT.php')
-rw-r--r--modules/gallery/libraries/ORM_MPTT.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php
index 0ec0a848..949ca48c 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
@@ -97,6 +98,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_builder
->update($this->table_name)
@@ -248,6 +250,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