Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
09d7b819
Commit
09d7b819
authored
Jul 10, 2013
by
alexpott
Browse files
Issue
#1999434
by kim.pepper, atchijov: Use Symfony Request for system module.
parent
67ffbd35
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/system/system.admin.inc
View file @
09d7b819
...
...
@@ -257,8 +257,10 @@ function system_themes_admin_form_submit($form, &$form_state) {
* Menu callback; Set the default theme.
*/
function
system_theme_default
()
{
if
(
isset
(
$_REQUEST
[
'theme'
])
&&
isset
(
$_REQUEST
[
'token'
])
&&
drupal_valid_token
(
$_REQUEST
[
'token'
],
'system-theme-operation-link'
))
{
$theme
=
$_REQUEST
[
'theme'
];
$request
=
Drupal
::
request
();
$theme
=
$request
->
get
(
'theme'
);
$token
=
$request
->
get
(
'token'
);
if
(
!
empty
(
$theme
)
&&
!
empty
(
$token
)
&&
drupal_valid_token
(
$token
,
'system-theme-operation-link'
))
{
// Get current list of themes.
$themes
=
list_themes
();
...
...
core/modules/system/system.api.php
View file @
09d7b819
...
...
@@ -1715,9 +1715,7 @@ function hook_template_preprocess_default_variables_alter(&$variables) {
*/
function
hook_custom_theme
()
{
// Allow the user to request a particular theme via a query parameter.
if
(
isset
(
$_GET
[
'theme'
]))
{
return
$_GET
[
'theme'
];
}
return
Drupal
::
request
()
->
query
->
get
(
'theme'
);
}
/**
...
...
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