Slight changes

This commit is contained in:
2014-12-01 22:53:45 +11:00
parent e5b825b837
commit 7a0220aa86
12 changed files with 56 additions and 45 deletions

View File

@@ -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 "";
}