You are here

function content_lock_drupal_goto_alter in Content locking (anti-concurrent editing) 7.2

Same name and namespace in other branches
  1. 7.3 content_lock.module \content_lock_drupal_goto_alter()

Implements hook_drupal_goto_alter().

File

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

Code

function content_lock_drupal_goto_alter(&$path, &$options, &$http_response_code) {

  // Add content lock token.
  if (module_exists('entity_translation') && fnmatch('node/*/edit/add/*/*', $path) && !isset($options['content_lock_token'])) {
    $options = array(
      'query' => array(
        'content_lock_token' => drupal_get_token($path),
      ),
    );
  }
}