diff --git a/booking.rooms.inc b/booking.rooms.inc index 7dc099c..98ef888 100644 --- a/booking.rooms.inc +++ b/booking.rooms.inc @@ -322,32 +322,6 @@ function booking_room_edit_form_validate($form, &$form_state) { ); } } - - /* - //get the specific room definition from the database - $details = db_query("SELECT * FROM {booking_room_definition} WHERE booking_room_location_id = :lid AND booking_room_number = :num", - array(':lid' => $values['booking_room_location_id'], ':num' => $values['booking_room_number']))->fetchObject(); - - //get all person-to-room mappings relating to this room and bed type - $mappings = db_query("SELECT count(*) as num FROM {booking_room_mapping} WHERE booking_eventid = :eid AND booking_roomid = :rid AND booking_room_bedtype = :type", - array(':eid' => $event->eid, ':rid' => $details->rid, ':type' => $values['booking_room_bedtype']))->fetchObject(); - - //watchdog('booking', "
Max beds of type !type for this room:\n@info
", - // array('!type' => $bed_inputs[$values['booking_room_bedtype']], '@info' => print_r( $mappings, true))); - - //make sure the value exists before validating it - if (!empty($values['booking_room_bedtype'])) - { - $db_field = $bed_inputs[$values['booking_room_bedtype']]; - //check that there is sufficient capacity to allocate another person to this room and bed type - if ($mappings->num >= $details->$db_field) - { - form_set_error('booking_room_number', - t('Unfortunately there are no beds available of the type specified in the room.') - ); - } - } - */ } /**