diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config.php | 6 | ||||
-rw-r--r-- | lib/program.php | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/config.php b/lib/config.php index 2b6b78e..88181b9 100644 --- a/lib/config.php +++ b/lib/config.php @@ -5,8 +5,10 @@ date_default_timezone_set('Europe/Berlin'); // $GLOBALS['CONFIG']['baseurl'] = 'http://foo.com/bar/'; $GLOBALS['CONFIG']['SCHEDULE'] = 'http://fahrplan.mrmcd.net/schedule.xml'; -$GLOBALS['CONFIG']['SCHEDULE_CACHE_TTL'] = 5*60; +$GLOBALS['CONFIG']['SCHEDULE_CACHE_TTL'] = 5; $GLOBALS['CONFIG']['SCHEDULE_SCALE'] = 0.2; // float, px per second +$GLOBALS['CONFIG']['SCHEDULE_OFFSET'] = strtotime('2014-11-06T17:00:00+01:00') - strtotime('2014-09-05T17:00:00+02:00'); + $GLOBALS['CONFIG']['ROOMS'] = array( 'saal1' => 'Saal 1', @@ -27,5 +29,3 @@ $GLOBALS['CONFIG']['FORMATS'] = array( 'audio' => 'Audio', 'slides' => 'Slide-Images', ); - -?> diff --git a/lib/program.php b/lib/program.php index 900d1d9..9da309b 100644 --- a/lib/program.php +++ b/lib/program.php @@ -6,7 +6,6 @@ function program() if(function_exists('apc_fetch') && $program = apc_fetch($cacheidx)) return $program; - echo 'fresh'; $program = array(); $schedule = simplexml_load_file($GLOBALS['CONFIG']['SCHEDULE']); @@ -95,6 +94,10 @@ function program() $program[$name][] = array( 'special' => 'daychange', 'title' => 'Daychange from Day '.$dayidx.' to '.($dayidx+1), + + 'start' => $dayend, + 'end' => strtotime((string)$schedule->day[$dayidx+1]['start']), + 'duration' => 60*60, ); } } |