diff --git a/core/lib/Drupal/Core/Utility/ProjectInfo.php b/core/lib/Drupal/Core/Utility/ProjectInfo.php index a2cf7a4..1ae1c4c 100644 --- a/core/lib/Drupal/Core/Utility/ProjectInfo.php +++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php @@ -50,25 +50,8 @@ class ProjectInfo { */ function processInfoList(array &$projects, array $list, $project_type, $status, array $additional_whitelist = array()) { foreach ($list as $file) { - // A disabled or hidden base theme of an enabled sub-theme still has all - // of its code run by the sub-theme, so we include it in our "enabled" - // projects list. - if ($status && !empty($file->sub_themes)) { - foreach ($file->sub_themes as $key => $name) { - // Build a list of installed sub-themes. - if ($list[$key]->status) { - $file->installed_sub_themes[$key] = $name; - } - } - // If the theme is uninstalled and there are no installed subthemes, we - // should ignore this base theme for the installed case. If the site is - // trying to display uninstalled themes, we'll catch it then. - if (!$file->status && empty($file->installed_sub_themes)) { - continue; - } - } - // Otherwise, just add projects of the proper status to our list. - elseif ($file->status != $status) { + // Just projects with a matching status should be listed. + if ($file->status != $status) { continue; } @@ -77,9 +60,8 @@ function processInfoList(array &$projects, array $list, $project_type, $status, continue; } - // Skip if it's a hidden module or hidden theme without installed - // sub-themes. - if (!empty($file->info['hidden']) && empty($file->installed_sub_themes)) { + // Skip if it's a hidden project and the project is not installed. + if (!empty($file->info['hidden']) && empty($status)) { continue; } @@ -120,25 +102,10 @@ function processInfoList(array &$projects, array $list, $project_type, $status, else { $project_display_type = $project_type; } - if (empty($status) && empty($file->installed_sub_themes)) { + if (empty($status)) { // If we're processing disabled modules or themes, append a suffix. - // However, we don't do this to a base theme with installed - // subthemes, since we treat that case as if it is installed. $project_display_type .= '-disabled'; } - // Add a list of sub-themes that "depend on" the project and a list of base - // themes that are "required by" the project. - if ($project_name == 'drupal') { - // Drupal core is always required, so this extra info would be noise. - $sub_themes = array(); - $base_themes = array(); - } - else { - // Add list of installed sub-themes. - $sub_themes = !empty($file->installed_sub_themes) ? $file->installed_sub_themes : array(); - // Add list of base themes. - $base_themes = !empty($file->base_themes) ? $file->base_themes : array(); - } if (!isset($projects[$project_name])) { // Only process this if we haven't done this project, since a single // project can have multiple modules or themes. @@ -151,8 +118,6 @@ function processInfoList(array &$projects, array $list, $project_type, $status, 'includes' => array($file->getName() => $file->info['name']), 'project_type' => $project_display_type, 'project_status' => $status, - 'sub_themes' => $sub_themes, - 'base_themes' => $base_themes, ); } elseif ($projects[$project_name]['project_type'] == $project_display_type) { @@ -164,12 +129,6 @@ function processInfoList(array &$projects, array $list, $project_type, $status, $projects[$project_name]['includes'][$file->getName()] = $file->info['name']; $projects[$project_name]['info']['_info_file_ctime'] = max($projects[$project_name]['info']['_info_file_ctime'], $file->info['_info_file_ctime']); $projects[$project_name]['datestamp'] = max($projects[$project_name]['datestamp'], $file->info['datestamp']); - if (!empty($sub_themes)) { - $projects[$project_name]['sub_themes'] += $sub_themes; - } - if (!empty($base_themes)) { - $projects[$project_name]['base_themes'] += $base_themes; - } } elseif (empty($status)) { // If we have a project_name that matches, but the project_display_type diff --git a/core/modules/update/src/UpdateManagerInterface.php b/core/modules/update/src/UpdateManagerInterface.php index e1dd5a4..c011bae 100644 --- a/core/modules/update/src/UpdateManagerInterface.php +++ b/core/modules/update/src/UpdateManagerInterface.php @@ -51,10 +51,6 @@ * 'theme'. * - project_status: This indicates if the project is enabled and will * always be TRUE, as the function only returns enabled projects. - * - sub_themes: If the project is a theme it contains an associative array - * of all sub-themes. - * - base_themes: If the project is a theme it contains an associative array - * of all base-themes. * * @see update_process_project_info() * @see update_calculate_project_data() diff --git a/core/modules/update/templates/update-project-status.html.twig b/core/modules/update/templates/update-project-status.html.twig index b00e0b2..4cc9a19 100644 --- a/core/modules/update/templates/update-project-status.html.twig +++ b/core/modules/update/templates/update-project-status.html.twig @@ -21,8 +21,6 @@ * - data: The data about an extra item. * - includes: The projects within the project. * - disabled: The currently disabled projects in the project. - * - base_themes: The base themes supplied by the project. - * - sub_themes: The subthemes supplied by the project. * * @see template_preprocess_update_project_status() * @@ -105,18 +103,4 @@ Includes: {{ includes|placeholder }} {% endtrans %} {% endif %} - - {% if base_themes %} - {% set basethemes = base_themes|join(', ') %} - {% trans %} - Depends on: {{ basethemes }} - {% endtrans %} - {% endif %} - - {% if sub_themes %} - {% set subthemes = sub_themes|join(', ') %} - {% trans %} - Required by: {{ subthemes|placeholder }} - {% endtrans %} - {% endif %} diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index dd2494f..cb8c209 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -247,42 +247,6 @@ function template_preprocess_update_project_status(&$variables) { } } - if (!empty($project['base_themes'])) { - asort($project['base_themes']); - $base_themes = array(); - foreach ($project['base_themes'] as $base_key => $base_theme) { - switch ($includes_status[$base_key]) { - case UPDATE_NOT_SECURE: - $base_status_label = t('Security update required!'); - break; - case UPDATE_REVOKED: - $base_status_label = t('Revoked!'); - break; - case UPDATE_NOT_SUPPORTED: - $base_status_label = t('Not supported!'); - break; - default: - $base_status_label = ''; - } - - if ($base_status_label) { - $base_themes[] = t('%base_theme (!base_label)', array( - '%base_theme' => $base_theme, - '!base_label' => $base_status_label, - )); - } - else { - $base_themes[] = drupal_placeholder($base_theme); - } - } - $variables['base_themes'] = $base_themes; - } - - if (!empty($project['sub_themes'])) { - sort($project['sub_themes']); - $variables['sub_themes'] = $project['sub_themes']; - } - // Set the project status details. $status_label = NULL; switch ($project['status']) {