From b50768142745dc4bfd8a9460c7490ddd00e3b06a Mon Sep 17 00:00:00 2001 From: chalbertgit Date: Tue, 13 Nov 2012 11:51:03 -0500 Subject: [#1907] Added administrative variable to set lock timeout. --- modules/gallery/libraries/ORM_MPTT.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index 534dd13b..ce0b102c 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -324,7 +324,8 @@ class ORM_MPTT_Core extends ORM { * Lock the tree to prevent concurrent modification. */ protected function lock() { - $result = $this->db->query("SELECT GET_LOCK('{$this->table_name}', 1) AS l")->current(); + $timeout = module::get_var("gallery", "lock_timeout"); + $result = $this->db->query("SELECT GET_LOCK('{$this->table_name}', $timeout) AS l")->current(); if (empty($result->l)) { throw new Exception("@todo UNABLE_TO_LOCK_EXCEPTION"); } -- cgit v1.2.3