Fixes for PHP 5.4+
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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)));
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -470,7 +470,7 @@ function travel_form_submit($form, &$form_state) {
|
||||
//watchdog('booking', "<pre>Travel data to save:\n@info</pre>", 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
|
||||
|
Reference in New Issue
Block a user