diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-23 20:58:26 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-23 20:58:26 +0000 |
commit | 708f3b970fe756efb7395e54dff488fb8016b4dc (patch) | |
tree | 6dc9da5aa362015f1660c4351335567df0649e85 /includes | |
parent | 3295866fad4b63dc8b937dc5b5aa481af22db2c3 (diff) | |
download | brdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.gz brdo-708f3b970fe756efb7395e54dff488fb8016b4dc.tar.bz2 |
#292565 follow-up by John Morahan: Restore ability to set 'user' as the 403/404 page.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 0906f8714..2de18d1fe 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -362,6 +362,11 @@ function drupal_not_found() { watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); + // Keep old path for reference, and to allow forms to redirect to it. + if (!isset($_REQUEST['destination'])) { + $_REQUEST['destination'] = $_GET['q']; + } + $path = drupal_get_normal_path(variable_get('site_404', '')); if ($path && $path != $_GET['q']) { // Custom 404 handler. Set the active item in case there are tabs to @@ -389,9 +394,13 @@ function drupal_not_found() { */ function drupal_access_denied() { drupal_set_header('403 Forbidden'); - watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); + // Keep old path for reference, and to allow forms to redirect to it. + if (!isset($_REQUEST['destination'])) { + $_REQUEST['destination'] = $_GET['q']; + } + $path = drupal_get_normal_path(variable_get('site_403', '')); if ($path && $path != $_GET['q']) { // Custom 403 handler. Set the active item in case there are tabs to |