aboutsummaryrefslogtreecommitdiff
path: root/view/streams-json-v1.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-20 23:21:20 +0100
committerMaZderMind2016-12-20 23:21:20 +0100
commit9af641e5854d6edb83be6666794eb4d5371dcd8f (patch)
tree489bc3fd4a838d0489a4db35c1f2db73b8f1a5d8 /view/streams-json-v1.php
parent6776bbbc887895b1dccd2dcb416a34958b4bc0a1 (diff)
parent4a7a7ed1bcc6f36fb18f7f564d8f43a7e64a2e48 (diff)
Merge branch 'master' into events/33c3
Diffstat (limited to '')
-rw-r--r--view/streams-json-v1.php23
1 files changed, 3 insertions, 20 deletions
diff --git a/view/streams-json-v1.php b/view/streams-json-v1.php
index af0909b..7962226 100644
--- a/view/streams-json-v1.php
+++ b/view/streams-json-v1.php
@@ -2,23 +2,9 @@
header('Content-Type: application/json');
-$conferences = Conferences::getActiveConferences();
-
-$struct = array();
-if(isset($GLOBALS['CONFIG']))
- $saved_config = $GLOBALS['CONFIG'];
-
-foreach ($conferences as $conference)
+foreach (Conferences::getActiveConferences() as $conference)
{
- /*
- ok. das ist so hacky. EIGENTLICH müsste man aus ModelBase
- das $GLOBALS tilgen und von der api ne v2 releasen, welche
- conferences als eigenes Objekt betrachtet
- */
- $GLOBALS['CONFIG'] = $conference['CONFIG'];
- $GLOBALS['MANDATOR'] = $conference['slug'];
-
- $overview = new Overview();
+ $overview = $conference->getOverview();
foreach($overview->getGroups() as $group => $rooms)
{
@@ -99,14 +85,11 @@ foreach ($conferences as $conference)
}
$struct[] = array(
- 'conference' => $conference['title'],
+ 'conference' => $conference->getTitle(),
'group' => $group,
'rooms' => $roomstruct,
);
}
}
-if(isset($saved_config))
- $GLOBALS['CONFIG'] = $saved_config;
-
echo json_encode($struct, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);