Fix participantListingURL on Manage Event
authorlarssandergreen <lars@wildsight.ca>
Fri, 26 May 2023 03:52:46 +0000 (21:52 -0600)
committerlarssandergreen <lars@wildsight.ca>
Fri, 26 May 2023 03:52:46 +0000 (21:52 -0600)
CRM/Event/Form/ManageEvent.php

index f630bd7eadbf01532ea06381e9e742f49d189044..5b00499fff7750df5335b6e77622f6147bbab1e4 100644 (file)
@@ -115,7 +115,13 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form {
       }
 
       $participantListingID = $eventInfo['participant_listing_id'] ?? NULL;
-      //CRM_Core_DAO::getFieldValue( 'CRM_Event_DAO_Event', $this->_id, 'participant_listing_id' );
+      if ($participantListingID) {
+        $participantListingURL = CRM_Utils_System::url('civicrm/event/participant',
+          "reset=1&id={$this->_id}",
+          FALSE, NULL, TRUE, TRUE
+        );
+      }
+      $this->assign('participantListingURL', $participantListingURL ?? NULL);
       $this->assign('participantListingID', $participantListingID);
       $this->assign('isOnlineRegistration', CRM_Utils_Array::value('is_online_registration', $eventInfo));