summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/user_shifts.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index ea3be85f..a80a6622 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -298,6 +298,11 @@ function view_user_shifts() {
$days = sql_select_single_col("SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` FROM `Shifts` ORDER BY `start`");
$rooms = sql_select("SELECT `RID` AS `id`, `Name` AS `name` FROM `Room` WHERE `show`='Y' ORDER BY `Name`");
+ if (count($rooms) == 0) {
+ error(_("The administration has not configured any rooms yet."));
+ redirect('?');
+ }
+
if (in_array('user_shifts_admin', $privileges))
$types = sql_select("SELECT `id`, `name` FROM `AngelTypes` ORDER BY `AngelTypes`.`name`");
else
@@ -315,6 +320,11 @@ function view_user_shifts() {
)
);
+ if (count($types) == 0) {
+ error(_("The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype."));
+ redirect('?');
+ }
+
if (! isset($_SESSION['user_shifts']))
$_SESSION['user_shifts'] = array();