You are here

function content_lock_release_item in Content locking (anti-concurrent editing) 6

Same name and namespace in other branches
  1. 6.2 content_lock.module \content_lock_release_item()
  2. 7.3 includes/content_lock.pages.inc \content_lock_release_item()
  3. 7 content_lock.module \content_lock_release_item()
  4. 7.2 content_lock.module \content_lock_release_item()

Menu callback; release a locked node for all users or a specific user.

Parameters

$nid: A node id.

$account: A user object.

Return value

This function will execute a redirect and doesn't return.

1 string reference to 'content_lock_release_item'
content_lock_menu in ./content_lock.module
Implementation of hook_menu().

File

./content_lock.module, line 490
Allows users to lock documents for modification.

Code

function content_lock_release_item($nid, $account = NULL) {
  content_lock_release($nid, $account ? $account->uid : NULL);
  if (_content_lock_verbose()) {
    drupal_set_message(t('The editing lock has been released.'));
  }
  drupal_goto($account ? "user/{$account->uid}/content_lock" : 'admin/content/node/content_lock');
}