/**
  * Updating a booking in the database.
  *
  * @global type $ilUser
  *
  * @param int   $a_booking_id               the booking ID
  * @param array $a_booking_attr_values      new Values of the attribute from the booking
  * @param array $a_old_booking_attr_values  old Values of the attribute from the booking
  * @param array $a_booking_values           new Values of the the booking
  * @param array $a_old_booking_values       old Values of the the booking (temporary unused, for expansion)
  * @param array $a_booking_participants     new Values of the participants
  * @param array $a_old_booking_participants old Values of the participants
  *
  * @return int 1 if succes, 0 if fail
  */
 public function updateBooking($a_booking_id, $a_booking_attr_values, $a_old_booking_attr_values, $a_booking_values, $a_old_booking_values, $a_booking_participants, $a_old_booking_participants)
 {
     global $ilUser;
     $fields = array('id' => array('integer', $a_booking_id), 'date_from' => array('timestamp', $a_booking_values['from']['date'] . " " . $a_booking_values['from']['time']), 'date_to' => array('timestamp', $a_booking_values['to']['date'] . " " . $a_booking_values['to']['time']), 'room_id' => array('integer', $a_booking_values['room']), 'user_id' => array('integer', $ilUser->getId()), 'subject' => array('text', $a_booking_values['subject']), 'public_booking' => array('boolean', $a_booking_values['book_public'] == '1'), 'bookingcomment' => array('text', $a_booking_values['comment']));
     $where = array('id' => array('integer', $a_booking_id), 'pool_id' => array('integer', $this->pool_id));
     $this->ilDB->update(dbc::BOOKINGS_TABLE, $fields, $where);
     $this->ilRoomSharingDatabase->updateBookingAttributes($a_booking_id, $a_booking_attr_values, $a_old_booking_attr_values);
     $this->ilRoomSharingDatabase->updateBookingParticipants($a_booking_id, $a_booking_participants, $a_old_booking_participants);
     $this->ilRoomSharingDatabase->updateBookingAppointment($a_booking_id, $a_booking_values);
     return 1;
 }