From: Roland Hieber Date: Thu, 18 Feb 2010 17:02:21 +0000 (+0100) Subject: moved db_user calls from includes to actual script, buggy when included from navigation X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/commitdiff_plain/HEAD?ds=inline moved db_user calls from includes to actual script, buggy when included from navigation --- diff --git a/inc/functions.inc b/inc/functions.inc index ca915c2..741f8f7 100644 --- a/inc/functions.inc +++ b/inc/functions.inc @@ -31,8 +31,6 @@ require_once("db.inc"); require_once("user.inc"); require_once("sec/secure.inc"); -db_user("roomreservation"); - /** * @page errorcodes Error Codes * @{ diff --git a/inc/mod_roomReservationConfig.inc b/inc/mod_roomReservationConfig.inc index 6acc199..7fe357a 100644 --- a/inc/mod_roomReservationConfig.inc +++ b/inc/mod_roomReservationConfig.inc @@ -32,8 +32,6 @@ require_once("mod_room-reservation/functions.inc"); require_once("mod_room-reservation/mod_roomReservationTimeslice.inc"); require_once("mod_room-reservation/mod_roomReservationRoomsManager.inc"); -db_user("roomreservation"); - /** * Determines if a privilege has been assigned * @param $sPriv (string) Privilege to test diff --git a/inc/mod_roomReservationRoomsManager.inc b/inc/mod_roomReservationRoomsManager.inc index 2ceb1b9..4c90b79 100644 --- a/inc/mod_roomReservationRoomsManager.inc +++ b/inc/mod_roomReservationRoomsManager.inc @@ -31,8 +31,6 @@ require_once("mod_room-reservation/functions.inc"); require_once("mod_room-reservation/mod_roomReservationRoom.inc"); require_once("mod_room-reservation/mod_roomReservationConfig.inc"); -db_user("roomreservation"); - /** Simple class for creating, editing and deleting rooms */ class mod_roomReservationRoomsManager { /** (mod_roomReservationConfig) Reference to the configuration */ diff --git a/src/config.php b/src/config.php index 3873bdd..f0fcf2d 100644 --- a/src/config.php +++ b/src/config.php @@ -30,6 +30,8 @@ require_once("sec/admsecure.inc"); require_once("mod_room-reservation/globals.inc"); require_once("mod_room-reservation/mod_roomReservationConfigPage.inc"); +db_user("roomreservation"); + $page = new mod_roomReservationConfigPage($g_rrCfg); $page->show(); ?> diff --git a/src/index.php b/src/index.php index 0e1de6e..6ad479d 100644 --- a/src/index.php +++ b/src/index.php @@ -28,6 +28,9 @@ require_once("mod_room-reservation/globals.inc"); require_once("mod_room-reservation/mod_roomReservationBookingPage.inc"); + +db_user("roomreservation"); + $page = new mod_roomReservationBookingPage($g_rrCfg, $g_rrRm, $g_rrBm); $page->setTitle(_c("room-reservation:Schedule of room bookings")); $page->show();