From da20992627d2fdbe88511582a936e5a4f635f66d Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 6 Dec 2025 19:22:19 +0000 Subject: [PATCH] still working --- timetable.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/timetable.php b/timetable.php index 89d1f25..4f54713 100644 --- a/timetable.php +++ b/timetable.php @@ -477,7 +477,7 @@ if ($school_id) { $stmt->execute([$school_id]); $school_settings = $stmt->fetch(PDO::FETCH_ASSOC); if ($school_settings && !empty($school_settings['working_days'])) { - $days_from_db = explode(',', $school_settings['working_days']); + $days_from_db = array_map('trim', explode(',', $school_settings['working_days'])); // Filter the days to ensure only valid weekdays are included, up to Friday. $valid_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; $days_of_week = array_intersect($days_from_db, $valid_days); @@ -554,6 +554,7 @@ $class_timetables = get_timetable_from_db($pdoconn, $classes, $timeslots, $days_ @@ -564,8 +565,10 @@ $class_timetables = get_timetable_from_db($pdoconn, $classes, $timeslots, $days_ Break - + - +