From 833978239dda227f6c4d0af747f9dfb3e9f2e9b5 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 29 Sep 2023 19:02:58 +1300 Subject: [PATCH] Remove unreachable code In 2020 this commit https://github.com/civicrm/civicrm-core/commit/10f289cab793ff8292560eba7d780ec8295a5862 removed the call to get the participant list from the search object and instead replaced it with a call to get it from the v4 api. In the process confirmEventUrl stopped being assinged to the template and no-one noticed. This removes the traces of it --- CRM/Event/Selector/Search.php | 10 ---------- templates/CRM/Event/Page/UserDashboard.tpl | 5 ----- 2 files changed, 15 deletions(-) diff --git a/CRM/Event/Selector/Search.php b/CRM/Event/Selector/Search.php index 9000dbbf90..f6fe87fcbb 100644 --- a/CRM/Event/Selector/Search.php +++ b/CRM/Event/Selector/Search.php @@ -337,16 +337,6 @@ class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Co $row['campaign'] = $allCampaigns[$result->participant_campaign_id] ?? NULL; $row['campaign_id'] = $result->participant_campaign_id; - // gross hack to show extra information for pending status - $statusClass = NULL; - if ((isset($row['participant_status_id'])) && - ($statusId = array_search($row['participant_status_id'], $statusTypes)) - ) { - $statusClass = $statusClasses[$statusId]; - } - - $row['showConfirmUrl'] = $statusClass == 'Pending'; - if (!empty($row['participant_is_test'])) { $row['participant_status'] = CRM_Core_TestEntity::appendTestText($row['participant_status']); } diff --git a/templates/CRM/Event/Page/UserDashboard.tpl b/templates/CRM/Event/Page/UserDashboard.tpl index 6ceeff6ad8..ad096f4858 100644 --- a/templates/CRM/Event/Page/UserDashboard.tpl +++ b/templates/CRM/Event/Page/UserDashboard.tpl @@ -39,11 +39,6 @@ {/if} {$row.participant_status} - - {if !empty($row.showConfirmUrl)} - {ts}Confirm Registration{/ts} - {/if} - {/foreach} -- 2.25.1