PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.0
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.0
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
← All changes | app/Services/TicketQueryService.php +5 -5 1.10.02.4.0 View file →
@@ -68,10 +68,9 @@
68 68 $ticketsQuery->searchBy($search);
69 69 }
70 70 }
71 71
72 - $ticketsQuery->orderBy($this->args['sort_by'], $this->args['sort_type']);
73 -
72 + $ticketsQuery->orderBy(sanitize_sql_orderby($this->args['sort_by']), sanitize_sql_orderby($this->args['sort_type']));
74 73 do_action_ref_array('fluent_support\main_tickets_query', [&$ticketsQuery, $this->args]);
75 74 $this->model = $ticketsQuery;
76 75 }
77 76
@@ -111,19 +110,20 @@
111 110 foreach ($filters as $filterGroup) {
112 111 $group = [];
113 112 //$filterItem is individual item under a group(And/OR)
114 113 foreach ($filterGroup as $filterItem) {
115 - if (count($filterItem['source']) != 2 || empty($filterItem['source'][0]) || empty($filterItem['source'][1]) || empty($filterItem['operator'])) {
114 + $source = $filterItem['source'] ?? [];
115 + if (!is_array($source) || count($source) != 2 || empty($source[0]) || empty($source[1]) || empty($filterItem['operator'])) {
116 116 continue;
117 117 }
118 118
119 - $provider = $filterItem['source'][0];
119 + $provider = $source[0];
120 120
121 121 if (!isset($group[$provider])) {
122 122 $group[$provider] = [];
123 123 }
124 124
125 - $property = $filterItem['source'][1];
125 + $property = $source[1];
126 126
127 127 $group[$provider][] = [
128 128 'property' => $property,
129 129 'operator' => $filterItem['operator'],