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 +6 -5 1.5.52.4.0 View file →
@@ -68,10 +68,10 @@
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']));
73 + do_action_ref_array('fluent_support\main_tickets_query', [&$ticketsQuery, $this->args]);
74 74 $this->model = $ticketsQuery;
75 75 }
76 76
77 77 public function paginate()
@@ -110,19 +110,20 @@
110 110 foreach ($filters as $filterGroup) {
111 111 $group = [];
112 112 //$filterItem is individual item under a group(And/OR)
113 113 foreach ($filterGroup as $filterItem) {
114 - 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'])) {
115 116 continue;
116 117 }
117 118
118 - $provider = $filterItem['source'][0];
119 + $provider = $source[0];
119 120
120 121 if (!isset($group[$provider])) {
121 122 $group[$provider] = [];
122 123 }
123 124
124 - $property = $filterItem['source'][1];
125 + $property = $source[1];
125 126
126 127 $group[$provider][] = [
127 128 'property' => $property,
128 129 'operator' => $filterItem['operator'],