diff -u b/core/modules/comment/comment.module b/core/modules/comment/comment.module --- b/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1654,7 +1654,7 @@ $variables['changed'] = format_date($comment->changed); $variables['new'] = !empty($comment->new) ? t('new') : ''; - if (theme_get_setting('features.comment_user_picture')) { + if (theme_get_setting('toggle_comment_user_picture')) { // To change user picture settings (e.g., image style), edit the 'compact' // view mode on the User entity. $variables['user_picture'] = user_view($comment->account, 'compact'); @@ -1662,7 +1662,7 @@ } $variables['new'] = !empty($comment->new) ? t('new') : ''; - if (theme_get_setting('toggle_comment_user_picture')) { + if (theme_get_setting('features.comment_user_picture')) { // To change user picture settings (e.g., image style), edit the 'compact' // view mode on the User entity. $variables['user_picture'] = user_view($comment->account, 'compact'); diff -u b/core/modules/system/system.install b/core/modules/system/system.install --- b/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2241,30 +2241,6 @@ } /** - * Move system theme settings from variables to config. - */ -function system_update_8038() { - // Build a list of themes to convert and install default config if provided. - $theme_settings_to_config_map = array('theme_settings' => 'system.theme.global'); - update_7_to_8_install_default_config('module', 'system.theme.global'); - $themes = list_themes(); - foreach ($themes as $theme) { - $theme_settings_to_config_map['theme_' . $theme->name . '_settings'] = $theme->name . '.settings'; - update_7_to_8_install_default_config('theme', $theme->name . '.settings'); - } - - // Converts array of theme settings from Drupal 7's variable system to Drupal - // 8's configuration management system. - foreach ($theme_settings_to_config_map as $variable => $config_name) { - $config = config($config_name); - $theme_settings = update_variable_get($variable); - if (!empty($theme_settings)) { - theme_settings_convert_to_config($theme_settings, $config)->save(); - } - } -} - -/** * @} End of "defgroup updates-7.x-to-8.x". * The next series of updates should start at 9000. */ @@ -2362,6 +2338,30 @@ } /** + * Move system theme settings from variables to config. + */ +function system_update_8043() { + // Build a list of themes to convert and install default config if provided. + $theme_settings_to_config_map = array('theme_settings' => 'system.theme.global'); + update_7_to_8_install_default_config('module', 'system.theme.global'); + $themes = list_themes(); + foreach ($themes as $theme) { + $theme_settings_to_config_map['theme_' . $theme->name . '_settings'] = $theme->name . '.settings'; + update_7_to_8_install_default_config('theme', $theme->name . '.settings'); + } + + // Converts array of theme settings from Drupal 7's variable system to Drupal + // 8's configuration management system. + foreach ($theme_settings_to_config_map as $variable => $config_name) { + $config = config($config_name); + $theme_settings = update_variable_get($variable); + if (!empty($theme_settings)) { + theme_settings_convert_to_config($theme_settings, $config)->save(); + } + } +} + +/** * @} End of "defgroup updates-7.x-to-8.x". * The next series of updates should start at 9000. */ diff -u b/core/modules/user/user.module b/core/modules/user/user.module --- b/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -864,7 +864,7 @@ $variables['extra'] = ''; if (empty($account->uid)) { $variables['uid'] = 0; - if (theme_get_setting('toggle_comment_user_verification')) { + if (theme_get_setting('features.comment_user_verification')) { $variables['extra'] = ' (' . t('not verified') . ')'; } } @@ -884,7 +884,7 @@ $variables['extra'] = ''; if (empty($account->uid)) { $variables['uid'] = 0; - if (theme_get_setting('features.comment_user_verification')) { + if (theme_get_setting('toggle_comment_user_verification')) { $variables['extra'] = ' (' . t('not verified') . ')'; } } only in patch2: unchanged: --- a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php @@ -97,20 +97,32 @@ function testPictureOnNodeComment() { $node = $this->drupalCreateNode(array('type' => 'article')); // Enable user pictures on nodes. - variable_set('theme_settings', array('toggle_node_user_picture' => TRUE)); + config('system.theme.global')->set('features.node_user_picture', TRUE)->save(); // Verify that the image is displayed on the user account page. $this->drupalGet('node/' . $node->nid); $this->assertRaw(file_uri_target($file->uri), 'User picture found on node page.'); // Enable user pictures on comments, instead of nodes. - variable_set('theme_settings', array('toggle_comment_user_picture' => TRUE)); + config('system.theme.global') + ->set('features.node_user_picture', FALSE) + ->set('features.comment_user_picture', TRUE) + ->save(); $edit = array( 'comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]' => $this->randomString(), ); $this->drupalPost('comment/reply/' . $node->nid, $edit, t('Save')); $this->assertRaw(file_uri_target($file->uri), 'User picture found on comment.'); + + // Disable user pictures on comments and nodes. + config('system.theme.global') + ->set('features.node_user_picture', FALSE) + ->set('features.comment_user_picture', FALSE) + ->save(); + + $this->drupalGet('node/' . $node->nid); + $this->assertNoRaw(file_uri_target($file->uri), 'User picture not found on node and comment.'); } /**