Slight changes
This commit is contained in:
@@ -64,7 +64,7 @@ function booking_roomlocation_define_form($node, &$form_state, $create, $editid
|
||||
{
|
||||
drupal_set_title('Edit Room Location');
|
||||
//verify that $editid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $editid)) {
|
||||
if (! ('/^[0-9]+$/', $editid)) {
|
||||
drupal_set_message("Error: Invalid room location ID supplied. Unable to edit room location definition.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/rooms');
|
||||
return "";
|
||||
@@ -177,7 +177,7 @@ function booking_roomlocation_define_form_submit($form, &$form_state) {
|
||||
elseif ($form_state['values']['op'] == 'Delete')
|
||||
{
|
||||
//verify that booking_lid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $values['booking_lid'])) {
|
||||
if (! ('/^[0-9]+$/', $values['booking_lid'])) {
|
||||
drupal_set_message("Error: Invalid room location ID supplied. Unable to delete entry.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
@@ -192,7 +192,7 @@ function booking_roomlocation_define_form_submit($form, &$form_state) {
|
||||
{
|
||||
|
||||
//verify that booking_sid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $values['booking_lid'])) {
|
||||
if (! ('/^[0-9]+$/', $values['booking_lid'])) {
|
||||
drupal_set_message("Error: Invalid room location ID supplied. Unable to update room location definition.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
@@ -335,7 +335,7 @@ function booking_rooms_definition_form($node, &$form_state, $create, $room_id =
|
||||
else
|
||||
{
|
||||
//verify that $editid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $room_id)) {
|
||||
if (! ('/^[0-9]+$/', $room_id)) {
|
||||
drupal_set_message("Error: Invalid room ID supplied. Unable to update room definition.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/rooms');
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user