fix defaults for other entities too
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 21 Sep 2016 07:28:44 +0000 (12:58 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 21 Sep 2016 07:28:44 +0000 (12:58 +0530)
CRM/Contact/BAO/SavedSearch.php

index de10219c4b7dbda9f58c404fb17f3661b1ffb128..90f4ddc53002379823fd093791bced33ef8efa74 100644 (file)
@@ -114,7 +114,7 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
         }
         if (strpos($id, '_date_low') !== FALSE || strpos($id, '_date_high') !== FALSE) {
           $result[$id] = date($dateFormat, strtotime($value));
-          $entityName = CRM_Utils_Array::value(0, explode('_', $id));
+          $entityName = strstr($id, '_date', TRUE);
           $result["{$entityName}_date_relative"] = 0;
         }
         else {