summaryrefslogtreecommitdiff
path: root/app/php
diff options
context:
space:
mode:
Diffstat (limited to 'app/php')
-rw-r--r--app/php/controls/UrlBasedCalendarControl.php14
-rw-r--r--app/php/pages/Calendar.page2
2 files changed, 14 insertions, 2 deletions
diff --git a/app/php/controls/UrlBasedCalendarControl.php b/app/php/controls/UrlBasedCalendarControl.php
index 336417b..b3e2253 100644
--- a/app/php/controls/UrlBasedCalendarControl.php
+++ b/app/php/controls/UrlBasedCalendarControl.php
@@ -13,13 +13,25 @@ class UrlBasedCalendarControl extends FacadeTemplateControl {
return;
}
}
- throw new THttpException(404, 'Page not found');
+ if ($this->getRaiseException()) {
+ throw new THttpException(404, 'Page not found');
+ } else {
+ $this->Visible = FALSE;
+ }
}
public function getCalendar() {
return $this->getControlState('Calendar');
}
+ public function setRaiseException($value) {
+ $this->setControlState('RaiseException', TPropertyValue::ensureBoolean($value));
+ }
+
+ public function getRaiseException() {
+ return $this->getControlState('RaiseException', FALSE);
+ }
+
}
?>
diff --git a/app/php/pages/Calendar.page b/app/php/pages/Calendar.page
index bc80d1a..1e2db8c 100644
--- a/app/php/pages/Calendar.page
+++ b/app/php/pages/Calendar.page
@@ -1,5 +1,5 @@
<com:TContent ID="Content">
- <com:CalendarDetails>
+ <com:CalendarDetails RaiseException="True">
<prop:Facade><%= CalendarFacade::getInstance() %></prop:Facade>
<prop:CalendarUrl><%= $this->Request->itemAt('calendar') %></prop:CalendarUrl>
</com:CalendarDetails>