bugfix in booking_room_edit_form_validate
This commit is contained in:
@@ -294,7 +294,13 @@ function booking_room_edit_form_validate($form, &$form_state) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the specific room definition from the database
|
//check if the location but not room number has been set
|
||||||
|
if ($values['booking_room_location_id'] > 0 && $values['booking_room_number'] == 0) {
|
||||||
|
//return here, since there is nothing we need to validate yet
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get the room definition from the database so we can verify there is capacity
|
||||||
$details = db_query("SELECT * FROM {booking_room_definition} WHERE booking_room_location_id = :lid AND booking_room_number = :num",
|
$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();
|
array(':lid' => $values['booking_room_location_id'], ':num' => $values['booking_room_number']))->fetchObject();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user