diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/relive-player.php | 8 | ||||
-rw-r--r-- | view/relive.php | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/view/relive-player.php b/view/relive-player.php index bc8bb57..587286b 100644 --- a/view/relive-player.php +++ b/view/relive-player.php @@ -1,10 +1,10 @@ <?php -$talks_by_id = relive_talks(); -$talk = @$talks_by_id[intval($_GET['id'])]; +$relive = new Relive(); +if(!$relive->isEnabled()) + throw new NotFoundException('Internal Relive is disabled'); -if(!$talk) - return require('page/404.php'); +$talk = $relive->getTalk(intval($_GET['id'])); echo $tpl->render(array( 'page' => 'relive-player', diff --git a/view/relive.php b/view/relive.php index 0608423..686d61e 100644 --- a/view/relive.php +++ b/view/relive.php @@ -1,7 +1,11 @@ <?php +$relive = new Relive(); +if(!$relive->isEnabled()) + throw new NotFoundException('Internal Relive is disabled'); + echo $tpl->render(array( 'page' => 'relive', 'title' => 'Relive!', - 'talks' => relive_talks(), + 'talks' => $relive->getTalks(), )); |