mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
migrate v1 api to the new conferences accessors
This commit is contained in:
parent
5ec71310d5
commit
9f10efd647
1 changed files with 3 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue