commit fd024207c35b1a8edcf867f901f279c33b8d97fd Author: Sally Young Date: Sat Oct 27 16:10:39 2012 +0100 Issue #1824762 Convert admin_compact_mode to CMI diff --git a/core/modules/system/config/system.site.yml b/core/modules/system/config/system.site.yml index 010dedf..ee9b6a7 100644 --- a/core/modules/system/config/system.site.yml +++ b/core/modules/system/config/system.site.yml @@ -5,3 +5,4 @@ page: 403: '' 404: '' front: user +admin_compact_mode: '0' diff --git a/core/modules/system/system.install b/core/modules/system/system.install index e938128..ac1aa94 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2215,6 +2215,17 @@ function system_update_8032() { } /** + * Move the admin_compact_mode setting from variable to config. + * + * @ingroup config_upgrade + */ +function system_update_8033() { + 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. */ diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 7f9f33a..2b06273 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3363,7 +3363,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'); } /**