From 0b67abeab9e835cb569748f327893bfca5a52d9a Mon Sep 17 00:00:00 2001 From: L_DA Date: Wed, 23 Sep 2020 22:02:26 +0200 Subject: [PATCH] no plan --- classes/timetable.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/classes/timetable.php b/classes/timetable.php index c46ffc9..48e3eda 100755 --- a/classes/timetable.php +++ b/classes/timetable.php @@ -87,14 +87,8 @@ class timetable { } } $day = new \DateTime($this->monday->format('Y-m-d\TH:i:sP')); - // TODO CHANGE DATABASE: table substitution: classesa -> classa, classesb -> classb !!! for ($i=0; $i<$this->numdayweek; $i++) { - if ($this->type == 'class') { - $sql = "date = '".$day->format('Ymd')."' AND ({$this->type}esa LIKE '%{$this->name}%' OR {$this->type}esb LIKE '%{$this->name}%')"; - } else { - $sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')"; - - } + $sql = "date = '".$day->format('Ymd')."' AND ({$this->type}a LIKE '%{$this->name}%' OR {$this->type}b LIKE '%{$this->name}%')"; if ($result = $DB->get_records_select('timetable_substitution',$sql)) { foreach ($result as $substitution) {