Fix preg_match fail

This commit is contained in:
2014-12-01 23:06:39 +11:00
parent 57a7704e62
commit 51bc775664
13 changed files with 38 additions and 38 deletions

View File

@@ -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');