From: rohieb Date: Sat, 26 Jul 2008 17:33:26 +0000 (+0200) Subject: mod_roomReservationBookingTable: if weekends are not shown, show the next week alread... X-Git-Tag: REL_8.07.26~12 X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/commitdiff_plain/6cf98ccf46c1c6aae846b4c5f8ff66a527cd685b?ds=inline;hp=--cc mod_roomReservationBookingTable: if weekends are not shown, show the next week already on saturday --- 6cf98ccf46c1c6aae846b4c5f8ff66a527cd685b diff --git a/includes/mod_roomReservationBookingTable.inc b/includes/mod_roomReservationBookingTable.inc index b592ce4..8d017f5 100644 --- a/includes/mod_roomReservationBookingTable.inc +++ b/includes/mod_roomReservationBookingTable.inc @@ -171,7 +171,12 @@ class mod_roomReservationBookingsTable /* extends mclWidget */ { } else { $this->setRoom($aoRooms[0]->getName()); } - $this->setDate(time()); + // if weekends are not shown, show the next week already on saturday + if(!$this->oCfg->isShowWeekend() and date("w") == 6) { + $this->setDate(strtotime("monday")); + } else { + $this->setDate(time()); + } $this->setAction(MOD_ROOM_RESERVATION_BT_ACTION_SHOW); $this->nPostInterval = 0;