Loads of changes
This commit is contained in:
@@ -63,6 +63,7 @@ function booking_import_data_admin_submit($form, &$form_state)
|
||||
$error = false;
|
||||
$update_counter = 0;
|
||||
$delimiter = ",";
|
||||
$result_array = array();
|
||||
|
||||
//get the file name from temporary storage field
|
||||
$file = $form_state['storage']['file'];
|
||||
@@ -120,6 +121,14 @@ function booking_import_data_admin_submit($form, &$form_state)
|
||||
}
|
||||
}
|
||||
|
||||
$result_array[] = t('Setting payment for id !nid to $!price of total required $!total and status to !status',
|
||||
array('!nid' => $record['nid'],
|
||||
'!price' => $record['booking_amount_paid'],
|
||||
'!total' => $record['booking_total_pay_reqd'],
|
||||
'!status' => _booking_status_lookup($record['booking_status'])
|
||||
)
|
||||
);
|
||||
//TODO: output this from $result_array
|
||||
drupal_set_message(t('Setting payment for id !nid to $!price of total required $!total and status to !status',
|
||||
array('!nid' => $record['nid'],
|
||||
'!price' => $record['booking_amount_paid'],
|
||||
@@ -127,8 +136,8 @@ function booking_import_data_admin_submit($form, &$form_state)
|
||||
'!status' => _booking_status_lookup($record['booking_status']))
|
||||
));
|
||||
|
||||
watchdog('booking', 'Setting payment for regn id !nid to $!price and status to !status',
|
||||
array('!nid' => $record['nid'], '!price' => $record['booking_amount_paid'], '!status' => _booking_status_lookup($record['booking_status'])));
|
||||
// watchdog('booking', 'Setting payment for regn id !nid to $!price and status to !status',
|
||||
// array('!nid' => $record['nid'], '!price' => $record['booking_amount_paid'], '!status' => _booking_status_lookup($record['booking_status'])));
|
||||
|
||||
db_update('booking_person')
|
||||
->fields(array(
|
||||
@@ -139,7 +148,10 @@ function booking_import_data_admin_submit($form, &$form_state)
|
||||
->condition('nid', $record['nid'])
|
||||
->execute();
|
||||
|
||||
}
|
||||
} //end processing input data
|
||||
|
||||
//output our results to watchdog
|
||||
watchdog('booking', '<pre>@print_r</pre>', array('@print_r', print_r( $result_array, TRUE)));
|
||||
|
||||
//delete the uploaded file
|
||||
file_delete($file);
|
||||
|
Reference in New Issue
Block a user