mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Follow-on to b507681427 - 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.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user