From 9e2dd8fd21e669b0117d302765a2fc35a252d60e Mon Sep 17 00:00:00 2001 From: Neil Drumm <drumm@delocalizedham.com> Date: Mon, 24 Mar 2025 17:45:05 +0000 Subject: [PATCH] Issue #3515037: Remove dead code around recommended branches --- drupalorg/drupalorg.module | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drupalorg/drupalorg.module b/drupalorg/drupalorg.module index d01a4f43..4628fe71 100644 --- a/drupalorg/drupalorg.module +++ b/drupalorg/drupalorg.module @@ -8724,9 +8724,8 @@ function drupalorg_project_release_xml_alter(&$xml, $project, $file, &$release_x switch ($file) { case 'current': - // Include the info about supported and recommended branches which are - // current. - $supported_branches = db_query('SELECT branch, latest_release, recommended FROM {project_release_supported_versions} WHERE nid = :nid AND supported = 1', [':nid' => $project->nid], ['fetch' => PDO::FETCH_ASSOC]); + // Include the info about supported branches which are current. + $supported_branches = db_query('SELECT branch, latest_release FROM {project_release_supported_versions} WHERE nid = :nid AND supported = 1', [':nid' => $project->nid], ['fetch' => PDO::FETCH_ASSOC]); $by_latest_release = []; foreach ($supported_branches as $branch) { $by_latest_release[$branch['latest_release']] = $branch; @@ -8745,20 +8744,6 @@ function drupalorg_project_release_xml_alter(&$xml, $project, $file, &$release_x if (isset($current_latest_releases['node'])) { $current_supported_branches = array_intersect_key($by_latest_release, $current_latest_releases['node']); $xml->supported_branches = implode(',', array_column($current_supported_branches, 'branch')); - // “Recommended” by the project maintainer is a bit of a historical - // Drupalism that we may no longer need. The maintainer can - // communicate what they recommend via whether a branch is supported, - // and making stable (non-alpha/beta/etc) releases. Leaving this out - // for now, but it is here if we want it. - // $current_recommended = []; - // foreach ($current_supported_branches as $branch) { - // if ($branch['recommended']) { - // $current_recommended[] = $branch['branch']; - // } - // } - // if (!empty($current_recommended)) { - // $xml->recommended_branches = implode(',', $current_recommended); - // } } else { $project_status = 'unsupported'; -- GitLab