component export was broken due to eval cleanup, this should fix
authorkurund <kurund@civicrm.org>
Sat, 27 Jul 2013 18:29:42 +0000 (23:59 +0530)
committerkurund <kurund@civicrm.org>
Sat, 27 Jul 2013 18:29:42 +0000 (23:59 +0530)
CRM/Export/Form/Select.php

index 678e3f9f9f0a738cea2a6eafc4573ba3d56d80ef..f271f15606964947371cf3533e3d951f8a0faeaa 100644 (file)
@@ -112,8 +112,30 @@ class CRM_Export_Form_Select extends CRM_Core_Form {
       $components    = array('Contribute', 'Member', 'Event', 'Pledge', 'Case', 'Grant', 'Activity');
 
       if (in_array($componentName[1], $components)) {
-        $fieldName = strtoupper($componentName[1]) . '_EXPORT';
-        $this->_exportMode = self::$fieldName;
+        switch ($componentName[1]) {
+          case 'Contribute':
+            $this->_exportMode = self::CONTRIBUTE_EXPORT;
+            break;
+          case 'Member':
+            $this->_exportMode = self::MEMBER_EXPORT;
+            break;
+          case 'Event':
+            $this->_exportMode = self::EVENT_EXPORT;
+            break;
+          case 'Pledge':
+            $this->_exportMode = self::PLEDGE_EXPORT;
+            break;
+          case 'Case':
+            $this->_exportMode = self::CASE_EXPORT;
+            break;
+          case 'Grant':
+            $this->_exportMode = self::GRANT_EXPORT;
+            break;
+          case 'Activity':
+            $this->_exportMode = self::ACTIVITY_EXPORT;
+            break;
+        }
+
         $className = "CRM_{$componentName[1]}_Form_Task";
         $className::preProcessCommon( $this, true );
         $values = $this->controller->exportValues('Search');