PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Controllers/ItineraryController.php +6 -2 3.0.5.1 → 3.0.16 View file →
@@ -292,14 +292,18 @@
292 292 {
293 293 try {
294 294 $data = $request->get_json_params();
295 295 $ids = $data['ids'] ?? [];
296 + $dayIds = $data['day_ids'] ?? [];
296 297
297 - if (empty($ids) || !is_array($ids)) {
298 + $ids = is_array($ids) ? $ids : [];
299 + $dayIds = is_array($dayIds) ? $dayIds : [];
300 +
301 + if (empty($ids) && empty($dayIds)) {
298 302 return $this->error_response('No IDs provided for bulk delete', 400);
299 303 }
300 304
301 - $result = $this->service->bulkDelete($ids);
305 + $result = $this->service->bulkDelete($ids, $dayIds);
302 306
303 307 return $this->success_response([
304 308 'deleted' => $result['deleted'],
305 309 'failed' => $result['failed'],