diff --git a/booking.helper.inc b/booking.helper.inc index c3081e8..d210fa9 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -1269,7 +1269,8 @@ function _booking_process_refund($person) * Helper function to generate paypal form for payments */ function _booking_paypal_form($person, $invoiceid, $amount_owing, $button_text) { - return drupal_render(drupal_get_form('_booking_paypal_form_builder', $person, $invoiceid, $amount_owing, $button_text)); + $form = drupal_get_form('_booking_paypal_form_builder', $person, $invoiceid, $amount_owing, $button_text); + return drupal_render($form); } /** diff --git a/booking.regn_form.inc b/booking.regn_form.inc index 9d642d4..4a2b72d 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -1396,7 +1396,7 @@ function booking_form_submit($form, &$form_state) { $node->booking_total_pay_reqd = $payment_total_price->booking_price; //watchdog('booking', 'Node data: @info', array('@info' => var_export($node, TRUE))); - $foo = node_submit(&$node); + $foo = node_submit($node); //watchdog('booking', 'Node data after submit: @info', array('@info' => var_export($foo, TRUE))); $blah = node_save($foo); //watchdog('booking', 'Node data after save: @info', array('@info' => var_export($blah, TRUE))); diff --git a/booking.reports.inc b/booking.reports.inc index 76230da..13c9a5c 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -62,6 +62,7 @@ function booking_report_summary() { $state_header = array('State', 'Count', 'Males', 'Females', 'Baptised', 'Male Average Age', 'Female Average Age', 'Overall Average Age'); $state_rows = array(); $state_statistics = array(); + //$state_statistics = new stdClass(); //do some analysis about the people booked in //first the summary of states @@ -84,6 +85,9 @@ function booking_report_summary() { if (strcmp($state->booking_country,'Australia') == 0 ) { //$state_rows[] = array($state->booking_state, $state->state_count); //store the total count for this state + if (!isset($state_statistics[$state->booking_state])) { + $state_statistics[$state->booking_state] = new stdClass(); + } $state_statistics[$state->booking_state]->total_count = $state->state_count; $state_statistics[$state->booking_state]->male_count = 0; $state_statistics[$state->booking_state]->male_avg = 0; @@ -97,6 +101,7 @@ function booking_report_summary() { } //non australian states //$state_rows[] = array('International', $non_australia_count); + $state_statistics['International'] = new stdClass(); $state_statistics['International']->total_count = $non_australia_count; $state_statistics['International']->male_count = 0; $state_statistics['International']->male_avg = 0; diff --git a/booking.test_rooms.inc b/booking.test_rooms.inc index 4dc081b..1676009 100644 --- a/booking.test_rooms.inc +++ b/booking.test_rooms.inc @@ -134,11 +134,9 @@ function booking_rooms_allocate_test_form($node, &$form_state, $location_id) { //create an additional row for each queen bed //_booking_rooms_allocate_generate_queenbeds($data, $existing_beds, $default_row, &$counter, &$form); - _booking_rooms_allocate_generate_queenbeds($data, $existing_beds, $default_row, $counter, $form); - - } + _booking_rooms_allocate_generate_queenbeds($data, $existing_beds, $default_row, $counter, $form); + } //end foreach $room_query - $form['submit'] = array ( '#type' => 'submit', '#value' => t('Submit'), @@ -147,8 +145,7 @@ function booking_rooms_allocate_test_form($node, &$form_state, $location_id) { return array ( 'form' => $form, ); - -} +} //end booking_rooms_allocate_test_form /** * Process the submission for room assignment @@ -177,7 +174,6 @@ function booking_rooms_allocate_test_form_submit($form, &$form_state) { //go through the different bed types foreach ($bed_inputs as $type => $type_id) { - //if this bed type wasn't defined in the form, skip it if (empty($values[$type])) continue; diff --git a/booking.travel.inc b/booking.travel.inc index b080589..e23cfc1 100644 --- a/booking.travel.inc +++ b/booking.travel.inc @@ -470,7 +470,7 @@ function travel_form_submit($form, &$form_state) { //watchdog('booking', "
Travel data to save:\n@info
", array('@info' => print_r( $node, true))); //store the node - $foo = node_submit(&$node); + $foo = node_submit($node); $blah = node_save($foo); //send a confirmation email