Fix wrong action for edit event registration from search results
authorlarssandergreen <lars@wildsight.ca>
Wed, 5 Oct 2022 00:37:56 +0000 (18:37 -0600)
committerlarssandergreen <lars@wildsight.ca>
Wed, 5 Oct 2022 00:40:14 +0000 (18:40 -0600)
CRM/Event/Page/Tab.php

index ef08087eaf273df7e6ef553bd85b67a68d2c2d3e..7b918028ba6a2f09af59254a195481f8ddc3585c 100644 (file)
@@ -118,7 +118,7 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
 
-    if (($context == 'standalone' || $context === 'search') && $this->_action !== CRM_Core_Action::VIEW) {
+    if (($context == 'standalone' || $context === 'search') && ($this->_action !== CRM_Core_Action::VIEW && $this->_action !== CRM_Core_Action::UPDATE)) {
       $this->_action = CRM_Core_Action::ADD;
     }
     else {