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
299
Merge Requests
299
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
5e46282f
Commit
5e46282f
authored
Mar 04, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2192653
by ianthomas_uk, divesh.kumar: Remove drupal_set_title from authorize.php.
parent
e93b6852
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
22 deletions
+12
-22
core/authorize.php
core/authorize.php
+11
-15
core/includes/authorize.inc
core/includes/authorize.inc
+0
-4
core/modules/system/system.module
core/modules/system/system.module
+1
-1
core/modules/update/update.authorize.inc
core/modules/update/update.authorize.inc
+0
-2
No files found.
core/authorize.php
View file @
5e46282f
...
...
@@ -36,16 +36,6 @@
*/
const
MAINTENANCE_MODE
=
'update'
;
/**
* Renders a 403 access denied page for authorize.php.
*/
function
authorize_access_denied_page
()
{
drupal_add_http_header
(
'Status'
,
'403 Forbidden'
);
watchdog
(
'access denied'
,
'authorize.php'
,
NULL
,
WATCHDOG_WARNING
);
drupal_set_title
(
'Access denied'
);
return
t
(
'You are not allowed to access this page.'
);
}
/**
* Determines if the current user is allowed to run authorize.php.
*
...
...
@@ -97,11 +87,11 @@ function authorize_access_allowed() {
// Load the code that drives the authorize process.
require_once
__DIR__
.
'/includes/authorize.inc'
;
if
(
isset
(
$_SESSION
[
'authorize_
operation'
][
'
page_title'
]))
{
drupal_set_title
(
$_SESSION
[
'authorize_operation'
][
'page_title'
])
;
if
(
isset
(
$_SESSION
[
'authorize_page_title'
]))
{
$page_title
=
$_SESSION
[
'authorize_page_title'
]
;
}
else
{
drupal_set_title
(
t
(
'Authorize file system changes'
)
);
$page_title
=
t
(
'Authorize file system changes'
);
}
// See if we've run the operation and need to display a report.
...
...
@@ -113,7 +103,7 @@ function authorize_access_allowed() {
unset
(
$_SESSION
[
'authorize_filetransfer_info'
]);
if
(
!
empty
(
$results
[
'page_title'
]))
{
drupal_set_title
(
$results
[
'page_title'
])
;
$page_title
=
$results
[
'page_title'
]
;
}
if
(
!
empty
(
$results
[
'page_message'
]))
{
drupal_set_message
(
$results
[
'page_message'
][
'message'
],
$results
[
'page_message'
][
'type'
]);
...
...
@@ -161,12 +151,18 @@ function authorize_access_allowed() {
$show_messages
=
!
((
$batch
=
batch_get
())
&&
isset
(
$batch
[
'running'
]));
}
else
{
$output
=
authorize_access_denied_page
();
drupal_add_http_header
(
'Status'
,
'403 Forbidden'
);
watchdog
(
'access denied'
,
'authorize.php'
,
NULL
,
WATCHDOG_WARNING
);
$page_title
=
t
(
'Access denied'
);
$output
=
t
(
'You are not allowed to access this page.'
);
}
if
(
!
empty
(
$output
))
{
drupal_add_http_header
(
'Content-Type'
,
'text/html; charset=utf-8'
);
$maintenance_page
=
array
(
'#page'
=>
array
(
'#title'
=>
$page_title
,
),
'#theme'
=>
'maintenance_page'
,
'#content'
=>
$output
,
'#show_messages'
=>
$show_messages
,
...
...
core/includes/authorize.inc
View file @
5e46282f
...
...
@@ -290,10 +290,6 @@ function authorize_run_operation($filetransfer) {
$operation
=
$_SESSION
[
'authorize_operation'
];
unset
(
$_SESSION
[
'authorize_operation'
]);
if
(
!
empty
(
$operation
[
'page_title'
]))
{
drupal_set_title
(
$operation
[
'page_title'
]);
}
require_once
DRUPAL_ROOT
.
'/'
.
$operation
[
'file'
];
call_user_func_array
(
$operation
[
'callback'
],
array_merge
(
array
(
$filetransfer
),
$operation
[
'arguments'
]));
}
...
...
core/modules/system/system.module
View file @
5e46282f
...
...
@@ -1014,7 +1014,7 @@ function system_authorized_init($callback, $file, $arguments = array(), $page_ti
);
if
(
isset
(
$page_title
))
{
$_SESSION
[
'authorize_
operation'
][
'
page_title'
]
=
$page_title
;
$_SESSION
[
'authorize_page_title'
]
=
$page_title
;
}
}
...
...
core/modules/update/update.authorize.inc
View file @
5e46282f
...
...
@@ -237,7 +237,6 @@ function update_authorize_update_batch_finished($success, $results) {
$_SESSION
[
'authorize_results'
][
'page_message'
]
=
$page_message
;
$_SESSION
[
'authorize_results'
][
'messages'
]
=
$results
[
'log'
];
$_SESSION
[
'authorize_results'
][
'tasks'
]
=
$results
[
'tasks'
];
$_SESSION
[
'authorize_operation'
][
'page_title'
]
=
t
(
'Update manager'
);
}
/**
...
...
@@ -296,7 +295,6 @@ function update_authorize_install_batch_finished($success, $results) {
$_SESSION
[
'authorize_results'
][
'page_message'
]
=
$page_message
;
$_SESSION
[
'authorize_results'
][
'messages'
]
=
$results
[
'log'
];
$_SESSION
[
'authorize_results'
][
'tasks'
]
=
$results
[
'tasks'
];
$_SESSION
[
'authorize_operation'
][
'page_title'
]
=
t
(
'Update manager'
);
}
/**
...
...
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