cleanup trailing whitespace

This commit is contained in:
2016-05-19 08:24:50 +10:00
parent ea0a6bb8fc
commit f027df3f6e
15 changed files with 35 additions and 42 deletions

View File

@@ -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'))); $params['headers']['Bcc'] = "it@coadcorp.com, " . variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from')));
} else { } else {
$params['headers']['Bcc'] = "it@coadcorp.com"; $params['headers']['Bcc'] = "it@coadcorp.com";
} }
//retrieve the body of the email for a married couple only if we're combining pricing for couples //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) if (variable_get('booking_enable_combined_pricing', 0) == 1 && $node->booking_partner_id > 0)

View File

@@ -448,7 +448,7 @@ function _date_range_to_string($date_start, $date_end) {
} else { } else {
$end_string .= ' ' . strftime("%B", mktime(12, 0, 0, $end[2], 1, $end[1])); $end_string .= ' ' . strftime("%B", mktime(12, 0, 0, $end[2], 1, $end[1]));
//no need to append anything to $start_string //no need to append anything to $start_string
} }
//create a timestamp based on 1 Jan that year to compare //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])) { 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) { if (! $person->nid) {
watchdog('booking', "Unable to find matching person relating to registration id. Details were '" . var_export($person, TRUE) . "' ."); watchdog('booking', "Unable to find matching person relating to registration id. Details were '" . var_export($person, TRUE) . "' .");
return 0.00; return 0.00;
} }
$total_due = _booking_total_due($person); $total_due = _booking_total_due($person);
@@ -1442,7 +1442,7 @@ function _booking_travelform_email_summary($node) {
$bf_gf = $query->booking_firstname . " " . $query->booking_lastname; $bf_gf = $query->booking_firstname . " " . $query->booking_lastname;
} }
else else
$bf_gf = "N/A"; $bf_gf = "N/A";
$rows = array(); $rows = array();
@@ -1542,7 +1542,7 @@ function _booking_leader_helper_email_summary($node) {
// continue; // continue;
if ($studygroup->booking_is_readinggroup == 'Y') if ($studygroup->booking_is_readinggroup == 'Y')
continue; continue;
//calculate the session references //calculate the session references
//$sessionid = "session" . $i; //$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.', $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, array('!role' => $role, '!id' => $studygroup->sid, '!descrip' => $studygroup->booking_studygroup_descrip,
'!otherrole' => $otherrole, '!other' => $otherperson_name, '!phone' => $otherperson_phone, '!email' => $otherperson_email, '!otherrole' => $otherrole, '!other' => $otherperson_name, '!phone' => $otherperson_phone, '!email' => $otherperson_email,
)); ));
} }
} }

View File

@@ -635,7 +635,7 @@ function booking_schema() {
/* /*
), ),
'primary key' => array('nid'), 'primary key' => array('nid'),
); );
$schema['booking_person_helpareas'] = array( $schema['booking_person_helpareas'] = array(
'fields' => array( 'fields' => array(

View File

@@ -25,7 +25,7 @@ function booking_manual_payment_admin($nid)
array(':eid' => $event->eid,)); array(':eid' => $event->eid,));
//empty payment option //empty payment option
$payment_type_options[0] = ''; $payment_type_options[0] = '';
foreach($result as $row) foreach($result as $row)
{ {
@@ -66,7 +66,7 @@ function booking_manual_payment_admin($nid)
'#options' => $payment_balance_options, '#options' => $payment_balance_options,
'#default_value' => 1, '#default_value' => 1,
'#required' => FALSE, '#required' => FALSE,
); );
$header = array ( $header = array (
'booking_nid' => array('data' => t('Booking ID')), 'booking_nid' => array('data' => t('Booking ID')),

View File

@@ -164,8 +164,7 @@ function booking_menu() {
'access arguments' => array('administer site configuration'), 'access arguments' => array('administer site configuration'),
'file' => 'system.admin.inc', 'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'), 'file path' => drupal_get_path('module', 'system'),
//'type' => MENU_DEFAULT_LOCAL_TASK, //'type' => MENU_DEFAULT_LOCAL_TASK,
); );

View File

@@ -134,7 +134,7 @@ function _booking_process_payment($data) {
//verify paypal hasn't already sent through a notification for this payment //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 ", $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'])) array(':ipn_id' => $data['ipn_track_id']))
->fetchObject(); ->fetchObject();
if ($duplicate_check) if ($duplicate_check)
{ {
@@ -142,7 +142,7 @@ function _booking_process_payment($data) {
return; 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') $result = db_insert('booking_payment')
->fields(array( ->fields(array(

View File

@@ -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 Exact Issued Name:'), $node->booking_passport_issue_name);
$rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location); $rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location);
$rows[] = array(t('Destination Country:'), $node->booking_destination_country); $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 //outbound flight
$flight_rows[] = array(t('Internal Flight Booking Reference:'), $node->booking_outflight_bookingnum); $flight_rows[] = array(t('Internal Flight Booking Reference:'), $node->booking_outflight_bookingnum);
@@ -884,7 +884,6 @@ function booking_view($node, $view_mode) {
'#weight' => 9, '#weight' => 9,
); );
} }
} }

View File

@@ -383,7 +383,7 @@ function booking_report_flight_details() {
$query->condition($db_and); $query->condition($db_and);
$table_sort = $query->extend('TableSort')->orderbyHeader($header); $table_sort = $query->extend('TableSort')->orderbyHeader($header);
$result = $table_sort->execute(); $result = $table_sort->execute();
foreach($result as $data) foreach($result as $data)
{ {

View File

@@ -35,7 +35,7 @@ function booking_roomallocations_view_summary() {
$query->condition($db_and); $query->condition($db_and);
$query->fields('p')->fields('m')->fields('r')->fields('l'); $query->fields('p')->fields('m')->fields('r')->fields('l');
$table_sort = $query->extend('TableSort')->orderbyHeader($header); $table_sort = $query->extend('TableSort')->orderbyHeader($header);
$result = $table_sort->execute(); $result = $table_sort->execute();
foreach($result as $data) { foreach($result as $data) {
$location_link = $data->booking_roomlocation_descrip . l( $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 //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", $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 //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", $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_eventid', $event->eid)
->condition('booking_nodeid', $values['personid']) ->condition('booking_nodeid', $values['personid'])
->execute(); ->execute();
//return; //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 " . $attendees = db_query("SELECT nid, booking_firstname, booking_lastname, booking_gender, booking_dob, booking_partner_id " .
" FROM {booking_person} " . " FROM {booking_person} " .
" WHERE booking_eventid = :eid and (booking_status=1 or booking_status=5) order by booking_lastname, booking_firstname", " 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 //define the header
$header = array ( $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), _booking_rooms_view_formatperson($attendees, (!empty($existing_beds[3][$j])) ? $existing_beds[3][$j++] : 0),
), ),
); );
} }
} }

View File

@@ -33,12 +33,11 @@ function booking_room_view_summary() {
//output everything //output everything
$output .= t("<h3>!event Room Locations</h3>", array('!event' => $event->booking_eventname)); $output .= t("<h3>!event Room Locations</h3>", 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; return $output;
} }
/** /**
* Form to view or add a studygroup definition * 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 //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", //$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))); //watchdog('booking', 'Checkboxes when setting buttons: @info', array ('@info' => var_export($checkboxes, TRUE)));
if ($form_state['values']['op'] == 'Create') 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() //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) foreach($query as $row)
{ {

View File

@@ -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_set_message("Error: Invalid room location ID '" . $location_id . "' supplied. Unable to allocate rooms.", 'error', FALSE);
drupal_goto('admin/booking/rooms'); drupal_goto('admin/booking/rooms');
return ""; return "";
} }
//query for existing room allocations //query for existing room allocations
$query = db_select('booking_person', 'p'); $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_nodeid', $previous_nid)
->condition('booking_room_bedtype', $type_id) ->condition('booking_room_bedtype', $type_id)
->condition('booking_roomid', $room) ->condition('booking_roomid', $room)
->execute(); ->execute();
} }
else 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.', $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, 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') db_update('booking_room_mapping')
->fields(array( ->fields(array(
@@ -365,8 +365,7 @@ function _booking_rooms_allocate_form_submit_helper(&$room_mapping, $room, $type
drupal_set_message($message); drupal_set_message($message);
} }
} }
/** /**
* function to generate table rows for each single bed defined in this room * 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_clone_array($default_row);
$new_row['booking_room_doublebed_p1'] = array('data' => &$double_bed_p1); $new_row['booking_room_doublebed_p1'] = array('data' => &$double_bed_p1);
$new_row['booking_room_doublebed_p2'] = array('data' => &$double_bed_p2); $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_p1);
unset($double_bed_p2); unset($double_bed_p2);

View File

@@ -99,7 +99,7 @@ function booking_available_leadhelp_select_form($node, &$form_state, $group_id)
$query->fields('p'); $query->fields('p');
//$query->groupBy('booking_gender'); //$query->groupBy('booking_gender');
$table_sort = $query->extend('TableSort')->orderbyHeader($header); $table_sort = $query->extend('TableSort')->orderbyHeader($header);
$result = $table_sort->execute(); $result = $table_sort->execute();
foreach($result as $data) foreach($result as $data)
{ {
@@ -1303,7 +1303,7 @@ function booking_studygroups_update_form($node, &$form_state, $sid) {
'booking_studygroup_role' => $person->booking_studygroup_role, '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) //elseif ($mapping->booking_session_id !== $person->session && $group->sid == $reading_group_id)

View File

@@ -35,7 +35,7 @@ function booking_studygroups_admin() {
//output everything //output everything
$output .= t("<h3>!event Study Groups</h3>", array('!event' => $event->booking_eventname)); $output .= t("<h3>!event Study Groups</h3>", 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; return $output;
@@ -73,7 +73,7 @@ function booking_studygroups_view_summary() {
//output everything //output everything
$output .= t("<h3>!event Study Groups</h3>", array('!event' => $event->booking_eventname)); $output .= t("<h3>!event Study Groups</h3>", 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; 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 //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", $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))); //watchdog('booking', 'Checkboxes when setting buttons: @info', array ('@info' => var_export($checkboxes, TRUE)));
if ($form_state['values']['op'] == 'Create Study Group') if ($form_state['values']['op'] == 'Create Study Group')

View File

@@ -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'))), '#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', '#type' => 'textarea',
'#default_value' => variable_get('booking_email_travel_complete_text', ''), '#default_value' => variable_get('booking_email_travel_complete_text', ''),
); );
/*Text for emails*/ /*Text for emails*/
$form['custom-emails'] = array( $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", $regncount_query = db_query("SELECT count(*) as num_ppl FROM {booking_person} where booking_eventid = :eventid and booking_status = 1",
array(':eventid' => $event->eid)) array(':eventid' => $event->eid))
->fetchObject(); ->fetchObject();
$tokens = array(); $tokens = array();
$tokens['eventname'] = $event->booking_eventname; $tokens['eventname'] = $event->booking_eventname;

View File

@@ -240,7 +240,7 @@ function booking_variety_create_session_form($node, &$form_state, $timeslot_id =
$form['tid'] = array ( $form['tid'] = array (
'#type' => 'hidden', '#type' => 'hidden',
'#value' => $timeslot_id, '#value' => $timeslot_id,
); );
$form['booking_variety_descrip'] = array ( $form['booking_variety_descrip'] = array (
'#type' => 'textfield', '#type' => 'textfield',