aboutsummaryrefslogtreecommitdiff
path: root/configs/conferences/datengarten
diff options
context:
space:
mode:
authorMaZderMind2016-02-26 16:28:27 +0100
committerMaZderMind2016-02-26 16:28:27 +0100
commit1b379a45c184f220b8e4419b1213e65da48246f7 (patch)
tree1b2a6f1701e3204d910c022b23ab89dbc39185b3 /configs/conferences/datengarten
parent1b4b3526d83316406c896dccfc93b6c5c4c27827 (diff)
autoconfigure dg & cr based on eventcalender upcoming
Diffstat (limited to 'configs/conferences/datengarten')
-rw-r--r--configs/conferences/datengarten/config.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/configs/conferences/datengarten/config.php b/configs/conferences/datengarten/config.php
index f196d43..6327f1a 100644
--- a/configs/conferences/datengarten/config.php
+++ b/configs/conferences/datengarten/config.php
@@ -1,8 +1,17 @@
<?php
-$EPISODE = 63;
-$DATE = strtotime("2016-02-09 20:00");
-$TITLE = 'Anna-Lena Baecker - WLAN in Hochgeschwindigkeitszügen';
+$upcoming = new Upcoming();
+$upcoming_events = $upcoming->getNextEvents();
+$upcoming_dgs = array_values(array_filter($upcoming_events, function($event) {
+ return preg_match('/^dg[0-9]+$/i', $event['short_name']);
+}));
+$upcoming_dg = $upcoming_dgs[0];
+
+preg_match('/^dg([0-9]+)$/i', $upcoming_dg['short_name'], $m);
+
+$EPISODE = intval($m[1]);
+$DATE = strtotime($upcoming_dg['start_date'].' 22:00');
+$TITLE = "Datengarten $EPISODE";
$GLOBALS['CONFIG']['CONFERENCE'] = array(