From 1066e64354ff44f88c7dd0de3bb3e50411458523 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 15 Jan 2010 12:41:22 -0800 Subject: Call parent::save() before releasing the lock to make creating the hole and filling it an atomic operation. --- modules/gallery/libraries/ORM_MPTT.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 46ae0af8..404d61ff 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -73,10 +73,13 @@ class ORM_MPTT_Core extends ORM { $this->unlock(); throw $e; } + parent::save(); $this->unlock(); + } else { + parent::save(); } - return parent::save(); + return $this; } /** -- cgit v1.2.3