Fix standalone export classes
authorColeman Watts <coleman@civicrm.org>
Mon, 7 Jun 2021 05:06:31 +0000 (01:06 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 7 Jun 2021 05:07:40 +0000 (01:07 -0400)
This fixes an 'access denied' error on standalone export forms,
caused by renaming the php classes.

Fixes dev/report#67

CRM/Export/Controller/Standalone.php

index aa954ee0e6dbaad945230f803d9b8563a8eb9bca..4e38d4a9d400fb894b3aafeaa3d47c8b12d18be1 100644 (file)
@@ -72,7 +72,7 @@ class CRM_Export_Controller_Standalone extends CRM_Core_Controller {
     $className = 'CRM_' . $this->getComponent($this->get('entity')) . '_Task';
     foreach ($className::tasks() as $taskId => $task) {
       $taskForm = (array) $task['class'];
-      if (strpos($taskForm[0], 'CRM_Export_Form_Select') === 0) {
+      if (strpos($taskForm[0], '_Export_Form_Select') !== FALSE) {
         $values['task'] = $taskId;
       }
     }