diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/booking.helper.inc b/booking.helper.inc index 61b15da..f8329bc 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -1351,14 +1351,14 @@ function _booking_details_email_summary($node) { $rows[] = t('Name: !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname)); $rows[] = t('Gender: !gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female')); $rows[] = t('Date of birth: !dob', array('!dob' => _booking_convert_ts($node->booking_dob)->format('d/m/Y'))); - + /* if (variable_get('booking_enable_passport', 1) == 1) { $rows[] = t('Passport Number: !value', array('!value' => $node->booking_passport_num)); $rows[] = t('Passport Expiry: !timestamp', array('!timestamp' => _booking_convert_ts($node->booking_passport_expiry_date)->format('d/m/Y'))); $rows[] = t('Passport Exact Issued Name: !value', array('!value' => $node->booking_passport_issue_name)); $rows[] = t('Passport Issue Location: !value', array('!value' => $node->booking_passport_issue_location)); } - + */ $rows[] = t('Email address: !email', array('!email' => $node->booking_email)); $rows[] = t('Home Phone Number: !home', array('!home' => $node->booking_phone)); $rows[] = t('Mobile Phone Number: !mob', array('!mob' => $node->booking_mobile)); diff --git a/booking.install b/booking.install index daf4e9f..b2fc473 100644 --- a/booking.install +++ b/booking.install @@ -538,6 +538,25 @@ function booking_update_7233() { _booking_node_create_mysqlview(); } +/** +* Remove deprecated passport/flight details +*/ +function booking_update_7234() { + $fields = array( + 'booking_passport_expiry_date', 'booking_passport_num', 'booking_passport_issue_location', + 'booking_passport_issue_name', 'booking_destination_country', 'booking_travel_insurance', + 'booking_outflight_bookingnum', 'booking_outflight_flightnum', 'booking_outflight_origin', + 'booking_outflight_origin_ts', 'booking_outflight_connecting_flightnum', 'booking_outflight_destination', + 'booking_outflight_destination_ts', 'booking_rtrnflight_bookingnum', 'booking_rtrnflight_flightnum', + 'booking_rtrnflight_origin', 'booking_rtrnflight_origin_ts', 'booking_rtrnflight_connecting_flightnum', + 'booking_rtrnflight_destination', 'booking_rtrnflight_destination_ts' + ); + foreach ($fields as $field) { + db_drop_field('booking_person', $field); + } +} + + /** * Implementation of hook_install(). */ @@ -684,6 +703,7 @@ function booking_schema() { 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), */ +/* //passport info 'booking_passport_expiry_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), 'booking_passport_num' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), @@ -707,6 +727,7 @@ function booking_schema() { 'booking_rtrnflight_connecting_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), 'booking_rtrnflight_destination' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), 'booking_rtrnflight_destination_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE), +*/ /* ), 'foreign keys' => array( @@ -722,33 +743,31 @@ function booking_schema() { 'primary key' => array('nid'), ); - - $schema['booking_event'] = array( 'fields' => array( - 'eid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_eventname' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE), - 'booking_event_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), - 'booking_register_open' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), - 'booking_register_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), - 'booking_earlybird_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), - 'booking_event_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), - 'booking_event_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'eid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_eventname' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE), + 'booking_event_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), + 'booking_register_open' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'booking_register_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'booking_earlybird_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'booking_event_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), + 'booking_event_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'), ), 'primary key' => array('eid'), ); $schema['booking_price'] = array( 'fields' => array( - 'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), - 'booking_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), - 'booking_late_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), - 'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE), - 'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), - 'booking_late_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), - 'booking_price_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), - 'booking_earlybird_rate' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), - 'booking_depositonly' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), + 'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'), + 'booking_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), + 'booking_late_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'), + 'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE), + 'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), + 'booking_late_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE), + 'booking_price_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), + 'booking_earlybird_rate' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), + 'booking_depositonly' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE), ), 'primary key' => array('pid'), ); diff --git a/booking.regn_form.inc b/booking.regn_form.inc index 2733b37..229ed6c 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -593,7 +593,7 @@ function booking_form($node, &$form_state, $inserting = FALSE) '#default_value' => empty($data->booking_medicare) ? '' : $data->booking_medicare ); } - + /* if (variable_get('booking_enable_passport', 0) == 1) { $form['passport-details'] = array( '#type' => 'fieldset', @@ -760,7 +760,7 @@ function booking_form($node, &$form_state, $inserting = FALSE) ); } } //end passport only fields - + */ if (variable_get('booking_enable_helpareas', 1) == 1) { $form['help-areas'] = array( '#type' => 'fieldset', diff --git a/booking.regn_node.inc b/booking.regn_node.inc index 1a5685a..97eeacb 100644 --- a/booking.regn_node.inc +++ b/booking.regn_node.inc @@ -286,6 +286,7 @@ function booking_insert($node) { 'booking_dob' => $node->booking_dob, 'booking_barcode' => $node->booking_barcode, 'booking_luckynum' => $node->booking_luckynum, +/* 'booking_passport_num' => $node->booking_passport_num, 'booking_passport_issue_location' => $node->booking_passport_issue_location, 'booking_passport_issue_name' => $node->booking_passport_issue_name, @@ -306,7 +307,8 @@ function booking_insert($node) { 'booking_rtrnflight_origin_ts' => $node->booking_rtrnflight_origin_ts, 'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum, 'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination, - 'booking_rtrnflight_destination_ts' => $node->booking_rtrnflight_destination_ts, + 'booking_rtrnflight_destination_ts' => $node->booking_rtrnflight_destination_ts, +*/ 'booking_gender' => $node->booking_gender, 'booking_street' => $node->booking_street, 'booking_suburb' => $node->booking_suburb, @@ -393,6 +395,7 @@ function booking_update($node) { 'booking_dob' => _date_to_ts($node->booking_dob), 'booking_barcode' => $node->booking_barcode, 'booking_luckynum' => $node->booking_luckynum == '' ? 0 : $node->booking_luckynum, +/* 'booking_passport_num' => $node->booking_passport_num, 'booking_passport_issue_location' => $node->booking_passport_issue_location, 'booking_passport_issue_name' => $node->booking_passport_issue_name, @@ -413,7 +416,8 @@ function booking_update($node) { 'booking_rtrnflight_origin_ts' => _datetime_to_ts($node->booking_rtrnflight_origin_ts), 'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum, 'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination, - 'booking_rtrnflight_destination_ts' => _datetime_to_ts($node->booking_rtrnflight_destination_ts), + 'booking_rtrnflight_destination_ts' => _datetime_to_ts($node->booking_rtrnflight_destination_ts), +*/ 'booking_gender' => $node->booking_gender, 'booking_street' => $node->booking_street, 'booking_suburb' => $node->booking_suburb, @@ -777,7 +781,7 @@ function booking_view($node, $view_mode) { $rows[] = array(t('Barcode:'), t('!id', array('!id' => $node->booking_barcode))); $rows[] = array(t('Date of birth:'), t('!dob', array('!dob' => format_date($node->booking_dob, 'custom', 'd/m/Y')))); $rows[] = array(t('Email address:'), t('!email', array('!email' => $node->booking_email))); - +/* if (variable_get('booking_enable_passport', 1) == 1) { $rows[] = array(t('Passport Number:'), $node->booking_passport_num); @@ -819,7 +823,7 @@ function booking_view($node, $view_mode) { '#weight' => 3, ); } - +*/ $rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type))); $rows[] = array(t('Amount Paid:'), t('!amount_paid', array('!amount_paid' => $node->booking_amount_paid))); $rows[] = array(t('Payment Complete Flag:'), t('!ans', array('!ans' => $node->booking_payment_complete == 'Y' ? 'Yes' : 'No')));