Remove any expired locks before testing if a lock is active.

This commit is contained in:
Andrew McMillan committed 2010-03-29 12:37:58 +13:00
1 parent 88c57486d9
commit fdfb20b14b
1 file changed
+5
+5
View File
@@ -654,6 +654,11 @@ EOSQL;
function IsLocked() {
if ( !isset($this->_locks_found) ) {
$this->_locks_found = array();
$sql = 'DELETE FROM locks WHERE (start + timeout) < current_timestamp';
$qry = new AwlQuery($sql);
$qry->Exec('caldav',__LINE__,__FILE__);
/**
* Find the locks that might apply and load them into an array
*/