function _content_lock_still_locked in Content locking (anti-concurrent editing) 7.3
Same name and namespace in other branches
- 6.2 content_lock.module \_content_lock_still_locked()
- 6 content_lock.module \_content_lock_still_locked()
- 7 content_lock.module \_content_lock_still_locked()
- 7.2 content_lock.module \_content_lock_still_locked()
Check lock status.
Parameters
int $uid: User ID.
int $nid: Node ID.
Return value
bool Return TRUE OR FALSE.
1 call to _content_lock_still_locked()
- _content_lock_show_warnings in includes/content_lock.func.inc 
- Show warnings.
File
- includes/content_lock.func.inc, line 31 
- content_lock.func.inc
Code
function _content_lock_still_locked($uid, $entity_id, $entity_type = 'node') {
  $query = db_select('content_lock', 'c')
    ->condition('entity_id', $entity_id)
    ->condition('entity_type', $entity_type)
    ->condition('uid', $uid)
    ->countQuery();
  $result = $query
    ->execute();
  return (bool) $result
    ->fetchField();
}