diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-01-24 23:48:07 -0500 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-24 23:48:07 -0500 |
commit | e8b7e155d5c3e315942ecfde8800a2c7679ec6b3 (patch) | |
tree | 1cd4ebd2b88c997f424189f12cbd252f1cdc3353 /modules/gallery/libraries | |
parent | 4926615cd01ff829324b61ac3e8f61f32f52a36b (diff) |
Follow-on to b50768142745dc4bfd8a9460c7490ddd00e3b06a - add a default
value for lock_timeout so that folks who get the latest code but don't
run the upgrader don't get burned by a SQL error.
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r-- | modules/gallery/libraries/ORM_MPTT.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/libraries/ORM_MPTT.php b/modules/gallery/libraries/ORM_MPTT.php index ada8bfad..c75aa0b2 100644 --- a/modules/gallery/libraries/ORM_MPTT.php +++ b/modules/gallery/libraries/ORM_MPTT.php @@ -324,7 +324,7 @@ class ORM_MPTT_Core extends ORM { * Lock the tree to prevent concurrent modification. */ protected function lock() { - $timeout = module::get_var("gallery", "lock_timeout"); + $timeout = module::get_var("gallery", "lock_timeout", 1); $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"); |