Add travel-form enabled check to travel form page
This commit is contained in:
@@ -12,9 +12,17 @@ function booking_travel_page() {
|
||||
if (! preg_match('/^[0-9A-Fa-f\-]+$/', arg(1))) {
|
||||
//parameter from url is not what we were expecting
|
||||
drupal_set_message("Error: Invalid session ID supplied. Please use the contact us form to let us know.", 'error', FALSE);
|
||||
drupal_goto('content/travel');
|
||||
return "";
|
||||
}
|
||||
|
||||
if (variable_get('booking_enable_travelform', 0) == 0) {
|
||||
drupal_set_message("Error: The travel form is not enabled. Please use the contact us form to inform the site owner of this error.", 'error', FALSE);
|
||||
drupal_goto('content/travel');
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//work out the node id from the session id
|
||||
$query = db_select('booking_person', 'p');
|
||||
$query->condition('p.booking_tempid', arg(1), '=')
|
||||
|
Reference in New Issue
Block a user