Fix preg_match fail
This commit is contained in:
@@ -76,7 +76,7 @@ function booking_variety_timeslot_form($node, &$form_state, $create, $editid = 0
|
||||
else
|
||||
{
|
||||
//verify that $editid is a number
|
||||
if (! ('/^[0-9]+$/', $editid)) {
|
||||
if (! preg_match('/^[0-9]+$/', $editid)) {
|
||||
drupal_set_message("Error: Invalid variety ID supplied. Unable to update variety session information.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/variety');
|
||||
return "";
|
||||
@@ -177,7 +177,7 @@ function booking_variety_timeslot_form_submit($form, &$form_state) {
|
||||
elseif ($form_state['values']['op'] == 'Delete')
|
||||
{
|
||||
//verify that tid is a number
|
||||
if (! ('/^[0-9]+$/', $values['tid'])) {
|
||||
if (! preg_match('/^[0-9]+$/', $values['tid'])) {
|
||||
drupal_set_message("Error: Invalid variety timeslot ID supplied. Unable to delete entry.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
@@ -193,7 +193,7 @@ function booking_variety_timeslot_form_submit($form, &$form_state) {
|
||||
else
|
||||
{
|
||||
//verify that booking_eid is a number
|
||||
if (! ('/^[0-9]+$/', $values['tid'])) {
|
||||
if (! preg_match('/^[0-9]+$/', $values['tid'])) {
|
||||
drupal_set_message("Error: Invalid variety session timeslot ID supplied. Unable to update entry.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
@@ -222,7 +222,7 @@ function booking_variety_create_session_form($node, &$form_state, $timeslot_id =
|
||||
$data = $node;
|
||||
|
||||
//verify that $editid is a number
|
||||
if (! ('/^[0-9]+$/', $timeslot_id)) {
|
||||
if (! preg_match('/^[0-9]+$/', $timeslot_id)) {
|
||||
drupal_set_message("Error: Invalid variety ID supplied. Unable to update variety session information.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/variety');
|
||||
return "";
|
||||
@@ -307,7 +307,7 @@ function booking_variety_list_session_form($node, &$form_state, $timeslot_id = 0
|
||||
$data = $node;
|
||||
|
||||
//verify that $editid is a number
|
||||
if (! ('/^[0-9]+$/', $timeslot_id)) {
|
||||
if (! preg_match('/^[0-9]+$/', $timeslot_id)) {
|
||||
drupal_set_message("Error: Invalid variety ID supplied. Unable to select variety session information.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/variety');
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user