summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/ORM_MPTT.php
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-12-09 18:31:01 +0200
committermamouneyya <mamoun.diraneyya@gmail.com>2010-12-09 18:31:01 +0200
commit3e2610ea83c60805d5e727df6509da6c49fd6c7b (patch)
tree28638f7a1cd2e298587f4b3960caf409f7d2d2fa /modules/gallery/libraries/ORM_MPTT.php
parent6aabab4b715ff8ac00cc667e9d0a40c9868410d8 (diff)
parentc3ef8921260db8e39b6d2a7b4708e3d19f35f8b5 (diff)
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/libraries/ORM_MPTT.php')
-rw-r--r--modules/gallery/libraries/ORM_MPTT.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php
index d8d88e4e..f20fafa0 100644
--- a/modules/gallery/libraries/ORM_MPTT.php
+++ b/modules/gallery/libraries/ORM_MPTT.php
@@ -96,12 +96,16 @@ class ORM_MPTT_Core extends ORM {
$item->reload()->delete();
}
- // Deleting children has affected this item
- $this->reload();
+ // Deleting children has affected this item, but we'll reload it below.
}
$this->lock();
$this->reload(); // Assume that the prior lock holder may have changed this entry
+ if (!$this->loaded()) {
+ // Concurrent deletes may result in this item already being gone. Ignore it.
+ return;
+ }
+
try {
db::build()
->update($this->table_name)