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
0bbca7fd
Commit
0bbca7fd
authored
Nov 21, 2012
by
webchick
Browse files
Issue
#1824762
by justafish, alexpott: Convert admin_compact_mode() to CMI.
parent
2c457bbc
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/system/config/system.site.yml
View file @
0bbca7fd
...
...
@@ -5,3 +5,4 @@ page:
403
:
'
'
404
:
'
'
front
:
user
admin_compact_mode
:
'
0'
core/modules/system/system.install
View file @
0bbca7fd
...
...
@@ -2220,6 +2220,17 @@ function system_update_8035() {
));
}
/**
* Move the admin_compact_mode setting from variable to config.
*
* @ingroup config_upgrade
*/
function
system_update_8036
()
{
update_variables_to_config
(
'system.site'
,
array
(
'admin_compact_mode'
=>
'admin_compact_mode'
,
));
}
/**
* @} End of "defgroup updates-7.x-to-8.x".
* The next series of updates should start at 9000.
...
...
core/modules/system/system.module
View file @
0bbca7fd
...
...
@@ -3379,7 +3379,7 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
function
system_admin_compact_mode
()
{
// PHP converts dots into underscores in cookie names to avoid problems with
// its parser, so we use a converted cookie name.
return
isset
(
$_COOKIE
[
'Drupal_visitor_admin_compact_mode'
])
?
$_COOKIE
[
'Drupal_visitor_admin_compact_mode'
]
:
variable_
get
(
'admin_compact_mode'
,
FALSE
);
return
isset
(
$_COOKIE
[
'Drupal_visitor_admin_compact_mode'
])
?
$_COOKIE
[
'Drupal_visitor_admin_compact_mode'
]
:
config
(
'system.site'
)
->
get
(
'admin_compact_mode'
);
}
/**
...
...
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