Fix failure to assign view tpl variables to view page if context=search is in the url
authoreileen <emcnaughton@wikimedia.org>
Sat, 12 Dec 2020 02:37:43 +0000 (15:37 +1300)
committereileen <emcnaughton@wikimedia.org>
Sat, 12 Dec 2020 02:40:09 +0000 (15:40 +1300)
Whack-a-mole round 10

CRM/Event/Page/Tab.php

index 47334d4af59cce3502a37d1b4e2e0689fa998e9e..ef08087eaf273df7e6ef553bd85b67a68d2c2d3e 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') {
+    if (($context == 'standalone' || $context === 'search') && $this->_action !== CRM_Core_Action::VIEW) {
       $this->_action = CRM_Core_Action::ADD;
     }
     else {