comment out debug statements
This commit is contained in:
@@ -944,15 +944,15 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
|
||||
|
||||
function booking_earlyaccess_feedback_callback($form, &$form_state) {
|
||||
global $event;
|
||||
$node = $form_state['values']['form_id'];
|
||||
//$node = $form_state['values']['form_id'];
|
||||
$data = $form_state['input'];
|
||||
//watchdog('booking', '<pre>booking_earlyaccess_feedback_callback validation:\n@info</pre>', array('@info' => print_r( $data, true)));
|
||||
|
||||
//if necessary, validate early access code
|
||||
if (variable_get('booking_enable_earlyaccess_codes', 0) == 1 && (isset($data['booking_earlyaccess']) && $data['booking_earlyaccess'] == 1)) {
|
||||
watchdog('booking', '<pre>booking_earlyaccess_feedback_callback first if statement passed</pre>');
|
||||
//watchdog('booking', '<pre>booking_earlyaccess_feedback_callback first if statement passed</pre>');
|
||||
if (isset($data['booking_earlyaccess_code']) && $data['booking_earlyaccess_code'] != '') {
|
||||
watchdog('booking', '<pre>booking_earlyaccess_feedback_callback second if statement passed</pre>');
|
||||
//watchdog('booking', '<pre>booking_earlyaccess_feedback_callback second if statement passed</pre>');
|
||||
//perform a database lookup against the booking_earlyaccess_codes table
|
||||
$code_check = db_query("SELECT cid " .
|
||||
"FROM {booking_earlyaccess_codes} " .
|
||||
@@ -962,15 +962,15 @@ function booking_earlyaccess_feedback_callback($form, &$form_state) {
|
||||
':eid' => $event->eid,
|
||||
)
|
||||
)->fetchObject();
|
||||
watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check:\n@info</pre>", array('@info' => print_r( $code_check, true)));
|
||||
//watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check:\n@info</pre>", array('@info' => print_r( $code_check, true)));
|
||||
//no matching code found so return an error
|
||||
if (! $code_check) {
|
||||
watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check did not pass!</pre>");
|
||||
//watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check did not pass!</pre>");
|
||||
return '<div id="booking_earlyaccess_feedback_wrapper"><span style="color:#8c2e0b;font-weight: bold;">You have entered an invalid early registration code. If you do not have a code, please wait until normal registrations open.</span><br /></div><br />';
|
||||
}
|
||||
//matched a code so let the user know everything is fine
|
||||
else {
|
||||
watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check matched</pre>");
|
||||
//watchdog('booking', "<pre>booking_earlyaccess_feedback_callback code check matched</pre>");
|
||||
return '<div id="booking_earlyaccess_feedback_wrapper"><span style="color:#234600;font-weight: bold;">Your early registration code has been validated.</span><br /></div><br />';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user