X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/51f84132ebff1270a1843ac751af64ae9d100838..ada3bd52df2712a6c6ead81aa646d5ec47aeeca2:/includes/mod_roomReservationBookingsManager.inc diff --git a/includes/mod_roomReservationBookingsManager.inc b/includes/mod_roomReservationBookingsManager.inc old mode 100755 new mode 100644 index e6bf3dc..124068d --- a/includes/mod_roomReservationBookingsManager.inc +++ b/includes/mod_roomReservationBookingsManager.inc @@ -144,7 +144,12 @@ class mod_roomReservationBookingsManager { ($ob->getUid() == null and !$this->oCfg->userCanBook())) { throw new AccessException(MOD_ROOM_RESERVATION_ERROR_ACCESS_DENIED); } - + + // test if room is whitelisted + if(!$this->oCfg->isRoomWhitelisted($ob->getRoom())) { + throw new Exception(MOD_ROOM_RESERVATION_ERROR_ROOM_NOT_WHITELISTED); + } + $strWhere = null; $strLog = ""; @@ -177,6 +182,7 @@ class mod_roomReservationBookingsManager { // Update or insert? if($ob->getUid() == null) { // No UID yet, insert new booking + // @todo write interval and user if interval > 0 $strLog = sprintf("Raum „%s“ am %s von %s bis %s gebucht ". "(Begründung: %s)", $ob->getRoom(), date("d\.m\.Y", $ob->getDate()), gmdate("G:i", $oTsB[$ob->getTsFirst()]), gmdate("G:i",