From f027df3f6e82c6970f43262c70c56fbc2b91f564 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 19 May 2016 08:24:50 +1000 Subject: [PATCH] cleanup trailing whitespace --- booking.emails.inc | 2 +- booking.helper.inc | 10 +++++----- booking.install | 2 +- booking.manual_payment.inc | 4 ++-- booking.module | 3 +-- booking.paypal.inc | 4 ++-- booking.regn_node.inc | 3 +-- booking.reports.inc | 2 +- booking.rooms.inc | 9 ++++----- booking.rooms_admin.inc | 10 ++++------ booking.rooms_allocate.inc | 11 +++++------ booking.studygroups.inc | 4 ++-- booking.studygroups_admin.inc | 7 +++---- booking.tokens.inc | 4 ++-- booking.variety.inc | 2 +- 15 files changed, 35 insertions(+), 42 deletions(-) diff --git a/booking.emails.inc b/booking.emails.inc index 9fae3e9..47fe844 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -384,7 +384,7 @@ function _booking_balance_payment_email($nid) $params['headers']['Bcc'] = "it@coadcorp.com, " . variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from'))); } else { $params['headers']['Bcc'] = "it@coadcorp.com"; - } + } //retrieve the body of the email for a married couple only if we're combining pricing for couples if (variable_get('booking_enable_combined_pricing', 0) == 1 && $node->booking_partner_id > 0) diff --git a/booking.helper.inc b/booking.helper.inc index ca1d9b3..64a53fd 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -448,7 +448,7 @@ function _date_range_to_string($date_start, $date_end) { } else { $end_string .= ' ' . strftime("%B", mktime(12, 0, 0, $end[2], 1, $end[1])); //no need to append anything to $start_string - } + } //create a timestamp based on 1 Jan that year to compare if (mktime(12, 0, 0, 1, 1, $end[1]) > mktime(12, 0, 0, 1, 1, $start[1])) { @@ -1047,7 +1047,7 @@ function _booking_amount_owing($person, $amount_paid = 0, $include_paypal_fees = if (! $person->nid) { watchdog('booking', "Unable to find matching person relating to registration id. Details were '" . var_export($person, TRUE) . "' ."); return 0.00; - } + } $total_due = _booking_total_due($person); @@ -1442,7 +1442,7 @@ function _booking_travelform_email_summary($node) { $bf_gf = $query->booking_firstname . " " . $query->booking_lastname; } else - $bf_gf = "N/A"; + $bf_gf = "N/A"; $rows = array(); @@ -1542,7 +1542,7 @@ function _booking_leader_helper_email_summary($node) { // continue; if ($studygroup->booking_is_readinggroup == 'Y') - continue; + continue; //calculate the session references //$sessionid = "session" . $i; @@ -1602,7 +1602,7 @@ function _booking_leader_helper_email_summary($node) { $rows[] = t('!role for !descrip (section !id). Your !otherrole is !other. You can contact them on !phone or !email.', array('!role' => $role, '!id' => $studygroup->sid, '!descrip' => $studygroup->booking_studygroup_descrip, '!otherrole' => $otherrole, '!other' => $otherperson_name, '!phone' => $otherperson_phone, '!email' => $otherperson_email, - )); + )); } } diff --git a/booking.install b/booking.install index d7e547b..02332fe 100644 --- a/booking.install +++ b/booking.install @@ -635,7 +635,7 @@ function booking_schema() { /* ), 'primary key' => array('nid'), - ); + ); $schema['booking_person_helpareas'] = array( 'fields' => array( diff --git a/booking.manual_payment.inc b/booking.manual_payment.inc index a0e11a2..6460187 100644 --- a/booking.manual_payment.inc +++ b/booking.manual_payment.inc @@ -25,7 +25,7 @@ function booking_manual_payment_admin($nid) array(':eid' => $event->eid,)); //empty payment option - $payment_type_options[0] = ''; + $payment_type_options[0] = ''; foreach($result as $row) { @@ -66,7 +66,7 @@ function booking_manual_payment_admin($nid) '#options' => $payment_balance_options, '#default_value' => 1, '#required' => FALSE, - ); + ); $header = array ( 'booking_nid' => array('data' => t('Booking ID')), diff --git a/booking.module b/booking.module index ab136c8..451566c 100644 --- a/booking.module +++ b/booking.module @@ -164,8 +164,7 @@ function booking_menu() { 'access arguments' => array('administer site configuration'), 'file' => 'system.admin.inc', 'file path' => drupal_get_path('module', 'system'), - //'type' => MENU_DEFAULT_LOCAL_TASK, - + //'type' => MENU_DEFAULT_LOCAL_TASK, ); diff --git a/booking.paypal.inc b/booking.paypal.inc index d38c39b..71903ff 100644 --- a/booking.paypal.inc +++ b/booking.paypal.inc @@ -134,7 +134,7 @@ function _booking_process_payment($data) { //verify paypal hasn't already sent through a notification for this payment $duplicate_check = db_query("SELECT payid, booking_person_nid FROM {booking_payment} where booking_ipn_track_id = :ipn_id ", array(':ipn_id' => $data['ipn_track_id'])) - ->fetchObject(); + ->fetchObject(); if ($duplicate_check) { @@ -142,7 +142,7 @@ function _booking_process_payment($data) { return; } - //watchdog('booking', 'Adding payment for user with node id: !id; event id: !eid', array('!id' => $nid, '!eid' => $eid)); + //watchdog('booking', 'Adding payment for user with node id: !id; event id: !eid', array('!id' => $nid, '!eid' => $eid)); $result = db_insert('booking_payment') ->fields(array( diff --git a/booking.regn_node.inc b/booking.regn_node.inc index 441457f..139e5ee 100644 --- a/booking.regn_node.inc +++ b/booking.regn_node.inc @@ -656,7 +656,7 @@ function booking_view($node, $view_mode) { $rows[] = array(t('Passport Exact Issued Name:'), $node->booking_passport_issue_name); $rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location); $rows[] = array(t('Destination Country:'), $node->booking_destination_country); - $rows[] = array(t('Travel Insurance details:'), $node->booking_travel_insurance); + $rows[] = array(t('Travel Insurance details:'), $node->booking_travel_insurance); //outbound flight $flight_rows[] = array(t('Internal Flight Booking Reference:'), $node->booking_outflight_bookingnum); @@ -884,7 +884,6 @@ function booking_view($node, $view_mode) { '#weight' => 9, ); } - } diff --git a/booking.reports.inc b/booking.reports.inc index ee22370..32fe508 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -383,7 +383,7 @@ function booking_report_flight_details() { $query->condition($db_and); $table_sort = $query->extend('TableSort')->orderbyHeader($header); - $result = $table_sort->execute(); + $result = $table_sort->execute(); foreach($result as $data) { diff --git a/booking.rooms.inc b/booking.rooms.inc index 0c2137e..7eb4348 100644 --- a/booking.rooms.inc +++ b/booking.rooms.inc @@ -35,7 +35,7 @@ function booking_roomallocations_view_summary() { $query->condition($db_and); $query->fields('p')->fields('m')->fields('r')->fields('l'); $table_sort = $query->extend('TableSort')->orderbyHeader($header); - $result = $table_sort->execute(); + $result = $table_sort->execute(); foreach($result as $data) { $location_link = $data->booking_roomlocation_descrip . l( @@ -302,7 +302,7 @@ function booking_room_edit_form_validate($form, &$form_state) { //get the room definition from the database so we can verify there is capacity $details = db_query("SELECT * FROM {booking_room_definition} WHERE booking_room_location_id = :lid AND booking_room_number = :num", - array(':lid' => $values['booking_room_location_id'], ':num' => $values['booking_room_number']))->fetchObject(); + array(':lid' => $values['booking_room_location_id'], ':num' => $values['booking_room_number']))->fetchObject(); //perform a check to see if this person is already allocated to this bed $check = db_query("SELECT * FROM {booking_room_mapping} WHERE booking_eventid = :eid AND booking_nodeid = :nid", @@ -344,7 +344,6 @@ function booking_room_edit_form_submit($form, &$form_state) { ->condition('booking_eventid', $event->eid) ->condition('booking_nodeid', $values['personid']) ->execute(); - //return; } @@ -441,7 +440,7 @@ function booking_rooms_view_form($node, &$form_state, $location_id) { $attendees = db_query("SELECT nid, booking_firstname, booking_lastname, booking_gender, booking_dob, booking_partner_id " . " FROM {booking_person} " . " WHERE booking_eventid = :eid and (booking_status=1 or booking_status=5) order by booking_lastname, booking_firstname", - array(':eid' => $event->eid))->fetchAllAssoc('nid'); + array(':eid' => $event->eid))->fetchAllAssoc('nid'); //define the header $header = array ( @@ -533,7 +532,7 @@ function booking_rooms_view_form($node, &$form_state, $location_id) { _booking_rooms_view_formatperson($attendees, (!empty($existing_beds[3][$j])) ? $existing_beds[3][$j++] : 0), ), ); - } + } } diff --git a/booking.rooms_admin.inc b/booking.rooms_admin.inc index 9835c07..5f3569a 100644 --- a/booking.rooms_admin.inc +++ b/booking.rooms_admin.inc @@ -33,12 +33,11 @@ function booking_room_view_summary() { //output everything $output .= t("

!event Room Locations

", array('!event' => $event->booking_eventname)); - $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); + $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); return $output; -} - +} /** * Form to view or add a studygroup definition @@ -144,8 +143,7 @@ function booking_roomlocation_define_form_submit($form, &$form_state) { //get the number of study groups before making this update //$count = db_query("SELECT count(*) as num FROM {booking_studygroup_list} WHERE booking_eventid = :eid", - // array(':eid' => $event->eid))->fetchObject(); - + // array(':eid' => $event->eid))->fetchObject(); //watchdog('booking', 'Checkboxes when setting buttons: @info', array ('@info' => var_export($checkboxes, TRUE))); if ($form_state['values']['op'] == 'Create') @@ -313,7 +311,7 @@ function booking_rooms_definition_form($node, &$form_state, $create, $room_id = //TODO: update to be like booking_price_form() - $query = db_query("SELECT * FROM {booking_room_locations} where booking_roomlocation_active='Y'"); + $query = db_query("SELECT * FROM {booking_room_locations} where booking_roomlocation_active='Y'"); foreach($query as $row) { diff --git a/booking.rooms_allocate.inc b/booking.rooms_allocate.inc index abb8476..9595b29 100644 --- a/booking.rooms_allocate.inc +++ b/booking.rooms_allocate.inc @@ -48,7 +48,7 @@ function booking_rooms_allocate_form($node, &$form_state, $location_id) { drupal_set_message("Error: Invalid room location ID '" . $location_id . "' supplied. Unable to allocate rooms.", 'error', FALSE); drupal_goto('admin/booking/rooms'); return ""; - } + } //query for existing room allocations $query = db_select('booking_person', 'p'); @@ -216,7 +216,7 @@ function booking_rooms_allocate_form_submit($form, &$form_state) { ->condition('booking_nodeid', $previous_nid) ->condition('booking_room_bedtype', $type_id) ->condition('booking_roomid', $room) - ->execute(); + ->execute(); } else @@ -329,7 +329,7 @@ function _booking_rooms_allocate_form_submit_helper(&$room_mapping, $room, $type { $message = t('Changing person id !id from old room !oldroom to new room !room with type !type bed.', array('!id' => $nid, '!room' => $room, '!type' => $type_id, - '!oldroom' => $room_mapping[$nid]->booking_roomid)); + '!oldroom' => $room_mapping[$nid]->booking_roomid)); db_update('booking_room_mapping') ->fields(array( @@ -365,8 +365,7 @@ function _booking_rooms_allocate_form_submit_helper(&$room_mapping, $room, $type drupal_set_message($message); } -} - +} /** * function to generate table rows for each single bed defined in this room @@ -443,7 +442,7 @@ function _booking_rooms_allocate_generate_doublebeds($data, $existing_beds, $def $new_row = _booking_clone_array($default_row); $new_row['booking_room_doublebed_p1'] = array('data' => &$double_bed_p1); $new_row['booking_room_doublebed_p2'] = array('data' => &$double_bed_p2); - $form['rooms']['#rows'][$counter] = $new_row; + $form['rooms']['#rows'][$counter] = $new_row; unset($double_bed_p1); unset($double_bed_p2); diff --git a/booking.studygroups.inc b/booking.studygroups.inc index 6f665e5..0ae9e45 100644 --- a/booking.studygroups.inc +++ b/booking.studygroups.inc @@ -99,7 +99,7 @@ function booking_available_leadhelp_select_form($node, &$form_state, $group_id) $query->fields('p'); //$query->groupBy('booking_gender'); $table_sort = $query->extend('TableSort')->orderbyHeader($header); - $result = $table_sort->execute(); + $result = $table_sort->execute(); foreach($result as $data) { @@ -1303,7 +1303,7 @@ function booking_studygroups_update_form($node, &$form_state, $sid) { 'booking_studygroup_role' => $person->booking_studygroup_role, ); - $updates_to_confirm[] = array('sid' => $mapping->sid, 'fields' => $update); + $updates_to_confirm[] = array('sid' => $mapping->sid, 'fields' => $update); } //elseif ($mapping->booking_session_id !== $person->session && $group->sid == $reading_group_id) diff --git a/booking.studygroups_admin.inc b/booking.studygroups_admin.inc index 24475f9..3f4fc9a 100644 --- a/booking.studygroups_admin.inc +++ b/booking.studygroups_admin.inc @@ -35,7 +35,7 @@ function booking_studygroups_admin() { //output everything $output .= t("

!event Study Groups

", array('!event' => $event->booking_eventname)); - $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); + $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); return $output; @@ -73,7 +73,7 @@ function booking_studygroups_view_summary() { //output everything $output .= t("

!event Study Groups

", array('!event' => $event->booking_eventname)); - $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); + $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes)); return $output; @@ -192,8 +192,7 @@ function booking_studygroups_define_form_submit($form, &$form_state) { //get the number of study groups before making this update $count = db_query("SELECT count(*) as num FROM {booking_studygroup_list} WHERE booking_eventid = :eid", - array(':eid' => $event->eid))->fetchObject(); - + array(':eid' => $event->eid))->fetchObject(); //watchdog('booking', 'Checkboxes when setting buttons: @info', array ('@info' => var_export($checkboxes, TRUE))); if ($form_state['values']['op'] == 'Create Study Group') diff --git a/booking.tokens.inc b/booking.tokens.inc index 50e5947..bb21006 100644 --- a/booking.tokens.inc +++ b/booking.tokens.inc @@ -458,7 +458,7 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text '#description' => t('Email text to indicate a person has completed the travel form. This email will be sent from the !email email address', array('!email' => variable_get('booking_logistics_email'))), '#type' => 'textarea', '#default_value' => variable_get('booking_email_travel_complete_text', ''), - ); + ); /*Text for emails*/ $form['custom-emails'] = array( @@ -688,7 +688,7 @@ function booking_define_tokens() $regncount_query = db_query("SELECT count(*) as num_ppl FROM {booking_person} where booking_eventid = :eventid and booking_status = 1", array(':eventid' => $event->eid)) - ->fetchObject(); + ->fetchObject(); $tokens = array(); $tokens['eventname'] = $event->booking_eventname; diff --git a/booking.variety.inc b/booking.variety.inc index 2af46c9..6b8a953 100644 --- a/booking.variety.inc +++ b/booking.variety.inc @@ -240,7 +240,7 @@ function booking_variety_create_session_form($node, &$form_state, $timeslot_id = $form['tid'] = array ( '#type' => 'hidden', '#value' => $timeslot_id, - ); + ); $form['booking_variety_descrip'] = array ( '#type' => 'textfield',