public static function DeliveryHelper::deliverRedirect in Helper 7
1 call to DeliveryHelper::deliverRedirect()
File
- lib/
DeliveryHelper.php, line 56
Class
Code
public static function deliverRedirect($result) {
if (is_int($result)) {
drupal_deliver_html_page($result);
return;
}
if (module_exists('redirect')) {
// Using the redirect module instead of drupal_goto() may allow this
// redirect to be stored in the page cache.
$redirect = new stdClass();
$redirect->redirect = $result;
redirect_redirect($redirect);
}
else {
drupal_goto($result, array(), 301);
}
}