Commit 0bbca7fd authored by webchick's avatar webchick

Issue #1824762 by justafish, alexpott: Convert admin_compact_mode() to CMI.

parent 2c457bbc
......@@ -5,3 +5,4 @@ page:
403: ''
404: ''
front: user
admin_compact_mode: '0'
......@@ -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.
......
......@@ -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');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment