You are here

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

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

Implements hook_preprocess_link().

File

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

Code

function content_lock_preprocess_link(&$vars) {

  // Append a CSRF token to all paths that show the node add/edit form.
  if (content_lock_is_path_protected($vars['path'])) {
    if (!isset($vars['options']['query']['content_lock_token'])) {
      $vars['options']['query']['content_lock_token'] = drupal_get_token($vars['path']);
    }
  }
}