function path_redirect_load in Path redirect 5
Same name and namespace in other branches
- 6 path_redirect.module \path_redirect_load()
Retrieve the specified URL redirect
4 calls to path_redirect_load()
- path_redirect_condition_path_has_redirect in ./
path_redirect_workflow.inc - Condition implementation: Check if the path has a redirect
- path_redirect_delete_confirm in ./
path_redirect.module - path_redirect_edit in ./
path_redirect.module - Callback for add and edit pages.
- path_redirect_edit_validate in ./
path_redirect.module
File
- ./
path_redirect.module, line 364
Code
function path_redirect_load($rid = NULL, $from = NULL) {
if (!empty($rid)) {
$result = db_fetch_array(db_query("SELECT rid, path, redirect, query, fragment, type FROM {path_redirect} WHERE rid = %d", $rid));
}
else {
if (!empty($from)) {
$result = db_fetch_array(db_query("SELECT rid, path, redirect, query, fragment, type FROM {path_redirect} WHERE path = '%s'", $from));
}
}
if ($result) {
$result['path'] = urldecode($result['path']);
}
return $result;
}