aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMaZderMind2016-12-10 18:22:34 +0100
committerMaZderMind2016-12-10 18:22:34 +0100
commitf6c0270d40f6730fe1e1820f2866b08792df1db6 (patch)
treef0da1effc9f55f2f75dc57fe1ba17419d559b45b /index.php
parentb227ac0ee80f6de300fed10a34e7393847227cfc (diff)
rewrite data-model so that every configuration option is accessed through the conference
Diffstat (limited to 'index.php')
-rw-r--r--index.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/index.php b/index.php
index 9a5e304..19a174a 100644
--- a/index.php
+++ b/index.php
@@ -59,7 +59,8 @@ try {
'route' => $route,
'canonicalurl' => forceslash(baseurl()).forceslash($route),
'assemblies' => 'template/assemblies/',
- 'assets' => 'assets/',
+ 'assets' => forceslash('assets'),
+ 'conference_assets' => '/',
'conference' => new GenericConference(),
));
@@ -113,7 +114,7 @@ try {
// redirect
$clients = Conferences::getActiveConferences();
- header('Location: '.forceslash( baseurl() . $clients[0]['link'] ));
+ header('Location: '.joinpath([baseurl(), $clients[0]->getSlug()]));
exit;
}
else
@@ -132,8 +133,9 @@ try {
require('view/404.php');
exit;
}
-
- Conferences::load($mandator);
+ else {
+ // fallthrough through to the main mandator-based routes
+ }
}
catch(Exception $e)
{
@@ -144,20 +146,19 @@ catch(Exception $e)
// PER-CONFERENCE CODE
-$GLOBALS['MANDATOR'] = $mandator;
-$conference = new Conference();
+$conference = Conferences::getConference($mandator);
// update template information
$tpl->set(array(
'baseurl' => forceslash(baseurl()),
'route' => $route,
- 'canonicalurl' => forceslash(baseurl()).forceslash($route),
- 'assets' => '../assets/',
+ 'canonicalurl' => joinpath([baseurl(), $mandator, $route]),
+ 'conference_assets' => forceslash($mandator),
'conference' => $conference,
- 'feedback' => new Feedback(),
- 'schedule' => new Schedule(),
- 'subtitles' => new Subtitles(),
+ 'feedback' => $conference->getFeedback(),
+ 'schedule' => $conference->getSchedule(),
+ 'subtitles' => $conference->getSubtitles(),
));
ob_start();