diff -u b/core/includes/module.inc b/core/includes/module.inc --- b/core/includes/module.inc +++ b/core/includes/module.inc @@ -678,6 +678,7 @@ $config->clear($module); } module_config_save($config); + drupal_get_installed_schema_version(NULL, TRUE); if (!empty($module_list)) { // Call hook_module_uninstall to let other modules act diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1400,10 +1400,9 @@ */ function theme_enable($theme_list) { drupal_clear_css_cache(); - $theme_data = system_rebuild_theme_data(); $config = config('system.theme'); foreach ($theme_list as $key) { - $config->set($key, theme_get_default_config($key, $theme_data)); + $config->set("$key.status", 1); // Install default configuration of the theme. config_install_default_config('theme', $key); } @@ -1418,24 +1417,6 @@ } /** - * - */ -function theme_get_default_config($theme, $theme_data = NULL) { - if (!$theme_data) { - $theme_data = system_rebuild_theme_data(); - } - $file = $theme_data[$theme]; - return array( - 'filename' => $file->uri, - 'name' => $file->name, - 'status' => 1, - 'owner' => isset($file->owner) ? $file->owner : '', - 'info' => $file->info, - 'weight' => 0, - ); -} - -/** * Disable a given list of themes. * * @param $theme_list @@ -1454,7 +1435,7 @@ $config = config('system.theme'); foreach ($theme_list as $key) { - $config->clear($key); + $config->set("$key.status", 0); } $config->save(); diff -u b/core/lib/Drupal/Component/ArraySelect.php b/core/lib/Drupal/Component/ArraySelect.php --- b/core/lib/Drupal/Component/ArraySelect.php +++ b/core/lib/Drupal/Component/ArraySelect.php @@ -58,7 +58,10 @@ foreach ($this->array as $key => $element) { $match = TRUE; foreach ($this->conditions as $condition) { - $match = $match && $this->match($element, $condition); + if (!$this->match($element, $condition)) { + $match = FALSE; + break; + } } if ($match) { $result[$key] = (object) $element; diff -u b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php --- b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php +++ b/core/modules/help/lib/Drupal/help/Tests/HelpTest.php @@ -112,8 +112,8 @@ ->condition('status', 1) ->execute(); foreach ($result as $module => $data) { - if (file_exists($data['filename']) && function_exists($module . '_help')) { - $modules[$module] = $data['info']['name']; + if (file_exists($data->filename) && function_exists($module . '_help')) { + $modules[$module] = $data->info['name']; } } return $modules; 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 @@ -508,8 +508,7 @@ function system_install() { // Enable the default theme. variable_set('theme_default', 'stark'); - $theme_config = theme_get_default_config('stark'); - config('system.theme')->set('stark', $theme_config)->save(); + config('system.theme')->set('stark.status', 1)->save(); // Populate the cron key variable. $cron_key = drupal_hash_base64(drupal_random_bytes(55)); diff -u b/core/modules/system/system.module b/core/modules/system/system.module --- b/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2538,9 +2538,6 @@ $config->clear($name); } } - if ($save) { - module_config_save($config); - } // All remaining files are not in the system table, so we need to add them. foreach ($files as &$file) { @@ -2548,11 +2545,26 @@ unset($file->exists); } else { + if ($type == 'theme') { + $data = array( + 'filename' => $file->uri, + 'name' => $file->name, + 'status' => 0, + 'owner' => isset($file->owner) ? $file->owner : '', + 'info' => $file->info, + 'weight' => 0, + ); + $config->set($file->name, $data); + $save = TRUE; + } $file->type = $type; $file->status = 0; $file->schema_version = -1; } } + if ($save) { + module_config_save($config); + } // If any module or theme was moved to a new location, we need to reset the // system_list() cache or we will continue to load the old copy, look for diff -u b/core/profiles/standard/standard.install b/core/profiles/standard/standard.install --- b/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -405,8 +405,7 @@ menu_router_rebuild(); // Enable the admin theme. - $theme_config = theme_get_default_config('seven'); - config('system.theme')->set('seven', $theme_config)->save(); + config('system.theme')->set('seven.status', 1)->save(); variable_set('admin_theme', 'seven'); variable_set('node_admin_theme', '1'); }