You are here

function notifications_url_signature in Notifications 7

Signature for url parameters

Parameters

$path: Path or array with path elements

$query: Query string elements

2 calls to notifications_url_signature()
notifications_check_signature in ./notifications.module
Check signature from URL and query string
notifications_url_options in ./notifications.module
Wrapper for url() function with some more options

File

./notifications.module, line 1383
Notifications module

Code

function notifications_url_signature($path, $query = array()) {
  $path = is_array($path) ? implode('/', $path) : $path;
  if (isset($query['signature'])) {
    unset($query['signature']);
  }
  $string = $query ? notifications_array_serialize($query) : 'none';
  return md5('notifications' . drupal_get_private_key() . ':' . $path . ':' . $string);
}