aboutsummaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
authorMaZderMind2016-12-10 18:22:34 +0100
committerMaZderMind2016-12-10 18:22:34 +0100
commitf6c0270d40f6730fe1e1820f2866b08792df1db6 (patch)
treef0da1effc9f55f2f75dc57fe1ba17419d559b45b /view
parentb227ac0ee80f6de300fed10a34e7393847227cfc (diff)
rewrite data-model so that every configuration option is accessed through the conference
Diffstat (limited to 'view')
-rw-r--r--view/feedback-read.php5
-rw-r--r--view/feedback.php4
-rw-r--r--view/overview.php2
-rw-r--r--view/relive.php2
-rw-r--r--view/room.php4
-rw-r--r--view/schedule-json.php2
-rw-r--r--view/schedule.php2
7 files changed, 9 insertions, 12 deletions
diff --git a/view/feedback-read.php b/view/feedback-read.php
index 4f04a02..3c29dbd 100644
--- a/view/feedback-read.php
+++ b/view/feedback-read.php
@@ -1,9 +1,6 @@
<?php
-$feedback = new Feedback();
-if(!$feedback->isEnabled())
- throw new NotFoundException('Feedback is disabled');
-
+$feedback = $conference->getFeedback();
if(!$feedback->isLoggedIn())
{
$feedback->requestLogin();
diff --git a/view/feedback.php b/view/feedback.php
index c4ba146..cff9c8e 100644
--- a/view/feedback.php
+++ b/view/feedback.php
@@ -1,11 +1,11 @@
<?php
-$feedback = new Feedback();
-if(!$feedback->isEnabled())
+if(!$conference->hasFeedback())
throw new NotFoundException('Feedback is disabled');
$info = $_POST;
+$feedback = $conference->getFeedback();
if($feedback->validate($info))
{
$feedback->store($info);
diff --git a/view/overview.php b/view/overview.php
index 3b52e8f..93cf007 100644
--- a/view/overview.php
+++ b/view/overview.php
@@ -4,5 +4,5 @@ echo $tpl->render(array(
'page' => 'overview',
'title' => 'Live-Streams',
- 'overview' => new Overview(),
+ 'overview' => $conference->getOverview(),
));
diff --git a/view/relive.php b/view/relive.php
index e59f80c..cc8d682 100644
--- a/view/relive.php
+++ b/view/relive.php
@@ -1,6 +1,6 @@
<?php
-$relive = new Relive();
+$relive = $conference->getRelive();
if(!$relive->isEnabled())
throw new NotFoundException('Internal Relive is disabled');
diff --git a/view/room.php b/view/room.php
index 505be95..d586248 100644
--- a/view/room.php
+++ b/view/room.php
@@ -1,6 +1,6 @@
<?php
-$room = new Room($_GET['room']);
+$room = $conference->getRoom($_GET['room']);
$stream = $room->selectStream(
$_GET['selection'], $_GET['language']);
@@ -11,5 +11,5 @@ echo $tpl->render(array(
'room' => $room,
'stream' => $stream,
- 'schedule' => new Schedule(),
+ 'schedule' => $conference->getSchedule(),
));
diff --git a/view/schedule-json.php b/view/schedule-json.php
index 9aea603..19346fd 100644
--- a/view/schedule-json.php
+++ b/view/schedule-json.php
@@ -1,6 +1,6 @@
<?php
-$schedule = new Schedule();
+$schedule = $conference->getSchedule();
if(!$schedule->isEnabled())
throw new NotFoundException('Schedule is disabled');
diff --git a/view/schedule.php b/view/schedule.php
index 4b2746d..3a3d6db 100644
--- a/view/schedule.php
+++ b/view/schedule.php
@@ -5,5 +5,5 @@ echo $tpl->render(array(
'title' => 'Schedule-Übersicht',
'refresh' => 15*60,
- 'schedule' => new Schedule(),
+ 'schedule' => $conference->getSchedule(),
));