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/BookingsController.php +10 -1 3.0.13 → 3.0.16 View file →
@@ -259,8 +259,11 @@
259 259 'trip_id' => (int) $request->get_param('trip_id'),
260 260 'search' => $request->get_param('search') ?: '',
261 261 'date_from' => $request->get_param('date_from') ?: '',
262 262 'date_to' => $request->get_param('date_to') ?: '',
263 + // Column sorting from the table headers — whitelisted in the repository.
264 + 'orderby' => $request->get_param('orderby') ?: '',
265 + 'order' => $request->get_param('order') ?: '',
263 266 ];
264 267
265 268 // Delegate to service
266 269 $result = $this->bookingService->getBookings($filters);
@@ -820,9 +823,15 @@
820 823 'trip_title' => $trip ? ($trip->title ?? $booking['trip_title'] ?? __('Trip Booking', 'yatra')) : ($booking['trip_title'] ?? __('Trip Booking', 'yatra')),
821 824 // Trip duration comes from duration_days/duration_nights (there is no
822 825 // `duration` column — accessing it caused a blank value + PHP notice).
823 826 'trip_duration' => $trip
824 - ? yatra_format_duration((int) ($trip->duration_days ?? 0), isset($trip->duration_nights) ? (int) $trip->duration_nights : null)
827 + ? yatra_format_duration(
828 + (int) ($trip->duration_days ?? 0),
829 + isset($trip->duration_nights) ? (int) $trip->duration_nights : null,
830 + // Hour-based day tours: "8 hours" instead of "1 day". Absent
831 + // or NULL on every day-based trip, which keeps its wording.
832 + (int) ($trip->duration_hours ?? 0)
833 + )
825 834 : '',
826 835 'trip_difficulty' => $trip ? ($trip->difficulty_name ?? '') : '',
827 836 'departure_location' => $trip ? ($trip->departure_location ?? '') : '',
828 837 'destination' => $trip ? ($trip->destination ?? '') : '',