From 40bf3b71ce2d09d78be80713930368ad83917fd5 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 23 Dec 2015 11:58:44 +0100 Subject: enable support for a preview-domain --- model/Conference.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'model') diff --git a/model/Conference.php b/model/Conference.php index fb29791..701d7c7 100644 --- a/model/Conference.php +++ b/model/Conference.php @@ -11,6 +11,12 @@ class Conference extends ModelBase } public function hasBegun() { + // on the preview-domain all conferences are always open + if($this->has('PREVIEW_DOMAIN') && $this->get('PREVIEW_DOMAIN') == $_SERVER['HTTP_HOST']) + { + return true; + } + if($this->has('CONFERENCE.CLOSED')) { $closed = $this->get('CONFERENCE.CLOSED'); @@ -35,6 +41,12 @@ class Conference extends ModelBase } public function hasEnded() { + // on the preview-domain no conference ever ends + if($this->has('PREVIEW_DOMAIN') && $this->get('PREVIEW_DOMAIN') == $_SERVER['HTTP_HOST']) + { + return false; + } + if($this->has('CONFERENCE.CLOSED')) { $closed = $this->get('CONFERENCE.CLOSED'); -- cgit v1.2.3