You are here

function redirect_hash in Redirect 7

Same name and namespace in other branches
  1. 7.2 redirect.module \redirect_hash()
7 calls to redirect_hash()
drush_redirect_create_redirect in ./redirect.drush.inc
Command callback. Validates and adds a redirect.
MigrateRedirectEntityHandler::redirectValidate in ./redirect.migrate.inc
Validates a redirect.
redirect_path_delete in ./redirect.module
Implements hook_path_delete().
redirect_path_update in ./redirect.module
Implements hook_path_update().
redirect_save in ./redirect.module
Save an URL redirect.

... See full list

File

./redirect.module, line 1227

Code

function redirect_hash($redirect) {
  $hash = array(
    'source' => $redirect->source,
    'language' => $redirect->language,
  );
  if (!empty($redirect->source_options['query'])) {
    $hash['source_query'] = $redirect->source_options['query'];
  }
  drupal_alter('redirect_hash', $hash, $redirect);
  redirect_sort_recursive($hash, 'ksort');
  $redirect->hash = drupal_hash_base64(serialize($hash));
  return $redirect->hash;
}