commit 9862a6e1db1421768c2bbce9bc1449bf12581600 Author: Sally Young Date: Wed Nov 14 16:00:06 2012 -0500 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 e29674e..ac5584f 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2224,6 +2224,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. */ diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 843ed78..16b1257 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3399,7 +3399,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'); } /**