CRM-15965: Until the search interface is updated, guard calls the new method.
authorFrank J. Gómez <frank@ginkgostreet.com>
Sun, 1 Mar 2015 22:06:06 +0000 (17:06 -0500)
committerFrank J. Gómez <frank@ginkgostreet.com>
Sun, 1 Mar 2015 22:06:06 +0000 (17:06 -0500)
CRM/Contact/Form/Search/Custom.php

index 1c5baee64de9d4312c384fe184f87722cd1a2d2f..0638a9d31011db5453d0fa70ca463abafe8f780a 100644 (file)
@@ -116,7 +116,13 @@ class CRM_Contact_Form_Search_Custom extends CRM_Contact_Form_Search {
   function buildTaskList() {
     // call the parent method to populate $this->_taskList for the custom search
     parent::buildTaskList();
-    return $this->_customClass->buildTaskList($this);
+
+    // @todo: When CRM_Contact_Form_Search_Interface is updated in 4.6, remove this check
+    if (is_callable(array($this->_customClass, 'buildTaskList'))) {
+      return $this->_customClass->buildTaskList($this);
+    } else {
+      return $this->_taskList;
+    }
   }
 
   function buildQuickForm() {