} } else { $do_crm_list_view = new CRMListView(); $object = $do_crm_list_view->get_list_view_object($m, "list"); $object->get_list_query(); //check if the custom view is on and get the date filter and advanced filter query if (isset($_REQUEST["custom_view_id"]) && (int) $_REQUEST["custom_view_id"] > 0) { $do_custom_view_filter = new CustomViewFilter(); $additional_where_condition = ''; $custom_view_date_filter_qry = $do_custom_view_filter->parse_custom_view_date_filter((int) $_REQUEST["custom_view_id"]); $custom_view_adv_filter_qry = $do_custom_view_filter->parse_custom_view_advanced_filter((int) $_REQUEST["custom_view_id"]); $additional_where_condition .= ' ' . $custom_view_date_filter_qry; //print_r($custom_view_adv_filter_qry); if (false !== $custom_view_adv_filter_qry) { $additional_where_condition = ' ' . $custom_view_adv_filter_qry["where"]; $do_data_display->set_ds_additional_query_param($custom_view_adv_filter_qry["bind_params"]); } $do_data_display->set_ds_additional_where($additional_where_condition); } } $entity_table_name = $object->getTable(); //CRMListView::get_listview_field_info() sets the list_view_field_information $fields_info = $object->list_view_field_information; /** * FIXME * For some reason when the array index starts with 0 the text box search works well but the asc/desc on the header does not * So $aColumns array is used for text search and adding a new array $ahColumns for header sort */ $aColumns = array(); $col_count = 0; foreach ($fields_info as $field_name => $info) {