aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorFlorian Larysch2015-09-09 03:40:40 +0200
committerFlorian Larysch2015-09-09 03:40:40 +0200
commitc46cc80be58b318b886eb1f0ba7a30194f1447c6 (patch)
tree2bcf6707598c746db5505819a33bc00f7538fb32 /model
parent7cae550e7b7d5cd10de939a4f899cce5e3683dc6 (diff)
make STARTS_AT and/or ENDS_AT optional
This is especially useful for conferences which don't have a set time frame.
Diffstat (limited to 'model')
-rw-r--r--model/Conference.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/model/Conference.php b/model/Conference.php
index 28c96e1..fb29791 100644
--- a/model/Conference.php
+++ b/model/Conference.php
@@ -27,7 +27,11 @@ class Conference extends ModelBase
return true;
}
- return time() >= $this->get('CONFERENCE.STARTS_AT');
+ if($this->has('CONFERENCE.STARTS_AT')) {
+ return time() >= $this->get('CONFERENCE.STARTS_AT');
+ } else {
+ return true;
+ }
}
public function hasEnded() {
@@ -41,7 +45,11 @@ class Conference extends ModelBase
return false;
}
- return time() >= $this->get('CONFERENCE.ENDS_AT');
+ if($this->has('CONFERENCE.ENDS_AT')) {
+ return time() >= $this->get('CONFERENCE.ENDS_AT');
+ } else {
+ return false;
+ }
}
public function hasAuthor() {