summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2012-11-15 01:40:53 -0800
committerBharat Mediratta <bharat@menalto.com>2012-11-15 01:40:53 -0800
commitbcdf2b56c62c63644cc6fa6796def559d7b18be8 (patch)
treec192f93f286fb0ca09b15a70f99b2b35833dc520 /modules/gallery/libraries
parent1ac8c883ab0db973659228f351d5b608200e6a56 (diff)
parentce9199a955c6f3446de6892f5dfed0035d326123 (diff)
Merge pull request #75 from chalbertgit/master
Ticket #1907, Add lock timeout as an editable variable in admin=>settings=>advanced
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/ORM_MPTT.php3
1 files changed, 2 insertions, 1 deletions
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");
}