function _content_lock_locking_save in Content locking (anti-concurrent editing) 7.3
Save locking into database.
1 call to _content_lock_locking_save()
- content_lock_locking in ./
content_lock.module - Try to lock a document for editing.
File
- includes/
content_lock.func.inc, line 144 - content_lock.func.inc
Code
function _content_lock_locking_save($entity_id, $uid, $entity_type = 'node') {
$result = db_merge('content_lock')
->key(array(
'entity_id' => $entity_id,
'entity_type' => $entity_type,
))
->fields(array(
'entity_id' => $entity_id,
'entity_type' => $entity_type,
'uid' => $uid,
'timestamp' => REQUEST_TIME,
'ajax_key' => rand(),
))
->execute();
return $result;
}