Fix preg_match fail
This commit is contained in:
@@ -130,7 +130,7 @@ function booking_room_edit_form($node, &$form_state, $nid) {
|
||||
$location_options[] = "--";
|
||||
|
||||
//verify that $nid is a number
|
||||
if (! ('/^[0-9]+$/', $nid)) {
|
||||
if (! preg_match('/^[0-9]+$/', $nid)) {
|
||||
drupal_set_message("Error: Invalid registration ID '" . $nid . "' supplied. Unable to edit study group sessions.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/rooms');
|
||||
return "";
|
||||
@@ -449,7 +449,7 @@ function booking_rooms_allocate_form($node, &$form_state, $location_id) {
|
||||
$counter = 0;
|
||||
|
||||
//verify that $location_id is a number
|
||||
if (! ('/^[0-9]+$/', $location_id)) {
|
||||
if (! preg_match('/^[0-9]+$/', $location_id)) {
|
||||
drupal_set_message("Error: Invalid room location ID '" . $location_id . "' supplied. Unable to allocate rooms.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/rooms');
|
||||
return "";
|
||||
@@ -817,7 +817,7 @@ function booking_rooms_view_form($node, &$form_state, $location_id) {
|
||||
$form = array();
|
||||
|
||||
//verify that $location_id is a number
|
||||
if (! ('/^[0-9]+$/', $location_id)) {
|
||||
if (! preg_match('/^[0-9]+$/', $location_id)) {
|
||||
drupal_set_message("Error: Invalid room location ID '" . $location_id . "' supplied. Unable to allocate rooms.",
|
||||
'error', FALSE);
|
||||
drupal_goto('admin/booking/rooms');
|
||||
|
Reference in New Issue
Block a user