From 76b46316f91d71b516490281642baec145bee88b Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Tue, 16 Oct 2018 13:07:52 +0300 Subject: [PATCH] schedule: add support for full schedule --- page-schedule.php | 11 +++++++++-- schedule-config.php | 2 +- schedule/parse.php | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/page-schedule.php b/page-schedule.php index b145a46..58fdc1c 100644 --- a/page-schedule.php +++ b/page-schedule.php @@ -7,7 +7,12 @@ require("schedule-config.php"); ?>
-
+'; +} +?>

-
"; get_sidebar(); +}; ?>
diff --git a/schedule-config.php b/schedule-config.php index f77e5b1..d0f1a0b 100644 --- a/schedule-config.php +++ b/schedule-config.php @@ -16,7 +16,7 @@ $data = loadData($sched_config); if ( preg_match('/^workshop/', $pagename) ) { $sched_config['filterEventType'] = "workshop"; -} else { +} else if (!preg_match('/^full/', $pagename)) { $sched_config['filterEventType'] = "lecture"; } $content = parseData($sched_config, $data); diff --git a/schedule/parse.php b/schedule/parse.php index 23feb37..01d9867 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -42,7 +42,7 @@ function parseData($config, $data) { $eid = $slot['event_id']; $etype = $data['events'][$eid]['event_type_id']; - if ($etype !== $filtered_type_id) { + if ($etype !== $filtered_type_id && !is_null($filtered_type_id)) { continue; }