db_user migration
[iserv-mod-room-reservation.git] / inc / mod_roomReservationConfig.inc
index 8dde982..6acc199 100644 (file)
@@ -32,6 +32,8 @@ 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
@@ -86,7 +88,6 @@ define("MOD_ROOM_RESERVATION_CONFIGFILE_HEADER", "<?php
 /*****************************************************************************/
 /**
  * Handling of the configuration file
- * @todo document
  */
 class mod_roomReservationConfig {
   
@@ -122,7 +123,7 @@ class mod_roomReservationConfig {
    * @{
    */
   
-       /**
+  /**
    * Add a timeslice. A check is done that the timeslices do not overlap, and
    * in this case, an Exception is thrown.
    * @param $oTs (mod_roomReservationTimeslice)
@@ -183,7 +184,7 @@ class mod_roomReservationConfig {
         throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
       } else {
         log_insert(sprintf("Raum „%s“ für Buchungen zur Verfügung gestellt",
-         $sRoom));
+    $sRoom));
       }
     }
   }
@@ -195,7 +196,7 @@ class mod_roomReservationConfig {
    */
   public function unWhitelistRoom($sRoom) {
     $h = db_query("DELETE FROM mod_roomreservation_roomswhitelist WHERE ".
-       "rrr_name = $1;", $sRoom);
+      "rrr_name = $1;", $sRoom);
     if(!$h) {
       throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
     } else {
@@ -212,7 +213,7 @@ class mod_roomReservationConfig {
    */
   public function isRoomWhitelisted($sRoom) {
     $h = db_query("SELECT * FROM mod_roomreservation_roomswhitelist WHERE ".
-       "rrr_name=$1;", $sRoom);
+      "rrr_name=$1;", $sRoom);
     if(!$h) {
       throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
     }
@@ -256,7 +257,7 @@ class mod_roomReservationConfig {
     array_merge($this->asMessages, array($sMessage));
   }
   
-       /**
+  /**
    * Get all timeslices in chronological order
    * @return array of rmTimeslice
    */
@@ -318,7 +319,6 @@ class mod_roomReservationConfig {
   /**
    * Determine if the current user has admin rights. This function tests 
    * if the user is in a group which has the privilege of admin rights.
-   * @todo test
    * @return bool
    */
   public function userIsAdmin() {
@@ -329,7 +329,6 @@ class mod_roomReservationConfig {
    * Determine if the current user can book rooms. This function tests 
    * if the user is in a group which has the privilege to book rooms.
    * If no group has this privilege, all users can book.
-   * @todo test
    * @return bool
    */
   public function userCanBook() {
@@ -348,7 +347,6 @@ class mod_roomReservationConfig {
    * if the user is in a group which has been configured as a group who
    * can view bookings. If no groups are configured, any user can view the
    * bookings table.
-   * @todo test
    * @return bool
    */
   public function userCanView() {
This page took 0.02607 seconds and 4 git commands to generate.