Slight changes
This commit is contained in:
@@ -96,7 +96,7 @@ function booking_studygroups_define_form($node, &$form_state, $create, $editid =
|
||||
{
|
||||
drupal_set_title('Edit Study Group');
|
||||
//verify that $editid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $editid)) {
|
||||
if (! ('/^[0-9]+$/', $editid)) {
|
||||
drupal_set_message("Error: Invalid study group ID supplied. Unable to edit study group definition.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/config/studygroups');
|
||||
return "";
|
||||
@@ -220,7 +220,7 @@ function booking_studygroups_define_form_submit($form, &$form_state) {
|
||||
elseif ($form_state['values']['op'] == 'Delete Study Group Definition')
|
||||
{
|
||||
//verify that booking_pid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $values['booking_sid'])) {
|
||||
if (! ('/^[0-9]+$/', $values['booking_sid'])) {
|
||||
drupal_set_message("Error: Invalid studygroup ID supplied. Unable to delete entry.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
@@ -238,7 +238,7 @@ function booking_studygroups_define_form_submit($form, &$form_state) {
|
||||
{
|
||||
|
||||
//verify that booking_sid is a number
|
||||
if (! preg_match('/^[0-9]+$/', $values['booking_sid'])) {
|
||||
if (! ('/^[0-9]+$/', $values['booking_sid'])) {
|
||||
drupal_set_message("Error: Invalid studygroup ID supplied. Unable to update study group.", 'error', FALSE);
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user