Remove unreachable code
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 29 Sep 2023 06:02:58 +0000 (19:02 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 29 Sep 2023 06:02:58 +0000 (19:02 +1300)
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
templates/CRM/Event/Page/UserDashboard.tpl

index 9000dbbf90be52bd273a73d83a466c46cdee2ae2..f6fe87fcbbe61f8a5200e255a3b499471ee4af5e 100644 (file)
@@ -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']);
       }
index 6ceeff6ad809d958b1707cc96f14c5dd8670c0f3..ad096f4858e488811a487a9dba3eff9928a0743a 100644 (file)
                             {/if}
                        </td>
                        <td class="crm-participant-participant_status">{$row.participant_status}</td>
-                       <td class="crm-participant-showConfirmUrl">
-                            {if !empty($row.showConfirmUrl)}
-                                <a href="{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$row.participant_id`"}">{ts}Confirm Registration{/ts}</a>
-                            {/if}
-                        </td>
                     </tr>
                 {/foreach}
             </table>