1 redirect.module | redirect_load_by_hash($hash, $reset = FALSE) |
Load an URL redirect from the database by {redirect}.hash.
Parameters
$hash: The hash of the URL redirect.
$reset: Whether to reset the redirect_load_multiple() cache.
Return value
Redirect|FALSE: An URL redirect object, or FALSE if loading failed.
Related topics
File
- core/
modules/ redirect/ redirect.module, line 438
Code
function redirect_load_by_hash($hash, $reset = FALSE) {
$redirects = redirect_load_multiple(array(), array('hash' => $hash), $reset);
return !empty($redirects) ? reset($redirects) : FALSE;
}