28 $select_query =
"SELECT count(*) AS cnt FROM $this->locks_table WHERE token = " . $this->db->quote(
$token,
'text');
29 $select_result = $this->db->query($select_query);
30 $row = $this->db->fetchAssoc($select_result);
44 $query =
"SELECT * FROM $this->lock_table" 45 .
" WHERE token = " . $this->db->quote(
$token,
'text')
46 .
" AND expires > " . $this->db->quote(time(),
'integer');
48 $select_result = $this->db->query(
$query);
49 $row = $this->db->fetchAssoc($select_result);
60 $query =
"SELECT * FROM $this->lock_table WHERE obj_id = " 61 . $this->db->quote($obj_id,
'integer')
62 .
" AND expires > " . $this->db->quote(time(),
'integer');
63 $select_result = $this->db->query(
$query);
64 $row = $this->db->fetchAssoc($select_result);
75 $this->db->insert($this->lock_table, array(
76 'token' => array(
'text', $ilias_lock->
getToken()),
77 'obj_id' => array(
'integer', $ilias_lock->
getObjId()),
78 'ilias_owner' => array(
'integer', $ilias_lock->
getIliasOwner()),
79 'dav_owner' => array(
'text', $ilias_lock->
getDavOwner()),
80 'expires' => array(
'integer', $ilias_lock->
getExpires()),
81 'depth' => array(
'integer', $ilias_lock->
getDepth()),
82 'type' => array(
'text', $ilias_lock->
getType()),
83 'scope' => array(
'integer', $ilias_lock->
getScope())
95 return $this->db->manipulate(
"DELETE FROM $this->lock_table WHERE token = " . $this->db->quote(
$token,
"integer"));
105 return $this->db->manipulate(
"DELETE FROM $this->lock_table WHERE expires < " . $this->db->quote(time(),
'integer'));
Represents a lock on an ilias object.
removeLockWithTokenFromDB($token)
Removes one specific lock.
getLockObjectWithObjIdFromDB($obj_id)
saveLockToDB(ilWebDAVLockObject $ilias_lock)
static createFromAssocArray($assoc_array)
checkIfLockExistsInDB($token)
purgeExpiredLocksFromDB()
Removes all locks from DB that are expired (expires < time())
getLockObjectWithTokenFromDB($token)
Returns lock Object from given tocken.