Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
297
Merge Requests
297
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
3e9948e5
Commit
3e9948e5
authored
Apr 04, 2006
by
Steven Wittens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#55869
: Redirect back to requested page after log-in
parent
4c3fe45f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
includes/common.inc
includes/common.inc
+12
-2
includes/menu.inc
includes/menu.inc
+2
-2
No files found.
includes/common.inc
View file @
3e9948e5
...
...
@@ -255,6 +255,11 @@ function drupal_not_found() {
drupal_set_header
(
'HTTP/1.0 404 Not Found'
);
watchdog
(
'page not found'
,
t
(
'%page not found.'
,
array
(
'%page'
=>
theme
(
'placeholder'
,
$_GET
[
'q'
]))),
WATCHDOG_WARNING
);
// Keep old path for reference
if
(
!
isset
(
$_REQUEST
[
'destination'
]))
{
$_REQUEST
[
'destination'
]
=
$_GET
[
'q'
];
}
$path
=
drupal_get_normal_path
(
variable_get
(
'site_404'
,
''
));
if
(
$path
&&
$path
!=
$_GET
[
'q'
])
{
menu_set_active_item
(
$path
);
...
...
@@ -262,7 +267,7 @@ function drupal_not_found() {
}
else
{
// Redirect to a non-existant menu item to make possible tabs disappear.
menu_set_active_item
(
'
#
'
);
menu_set_active_item
(
''
);
}
if
(
empty
(
$return
))
{
...
...
@@ -278,6 +283,11 @@ function drupal_access_denied() {
drupal_set_header
(
'HTTP/1.0 403 Forbidden'
);
watchdog
(
'access denied'
,
t
(
'%page denied access.'
,
array
(
'%page'
=>
theme
(
'placeholder'
,
$_GET
[
'q'
]))),
WATCHDOG_WARNING
,
l
(
t
(
'view'
),
$_GET
[
'q'
]));
// Keep old path for reference
if
(
!
isset
(
$_REQUEST
[
'destination'
]))
{
$_REQUEST
[
'destination'
]
=
$_GET
[
'q'
];
}
$path
=
drupal_get_normal_path
(
variable_get
(
'site_403'
,
''
));
if
(
$path
&&
$path
!=
$_GET
[
'q'
])
{
menu_set_active_item
(
$path
);
...
...
@@ -285,7 +295,7 @@ function drupal_access_denied() {
}
else
{
// Redirect to a non-existant menu item to make possible tabs disappear.
menu_set_active_item
(
'
#
'
);
menu_set_active_item
(
''
);
}
if
(
empty
(
$return
))
{
...
...
includes/menu.inc
View file @
3e9948e5
...
...
@@ -428,8 +428,8 @@ function menu_set_active_item($path = NULL) {
static
$stored_mid
;
$menu
=
menu_get_menu
();
if
(
is_null
(
$stored_mid
)
||
!
empty
(
$path
))
{
if
(
empty
(
$path
))
{
if
(
!
isset
(
$stored_mid
)
||
isset
(
$path
))
{
if
(
!
isset
(
$path
))
{
$path
=
$_GET
[
'q'
];
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment