Many changes...

This commit is contained in:
2014-10-10 22:32:41 +11:00
parent ba8bdca1ec
commit 09291b99fc
7 changed files with 150 additions and 14 deletions

View File

@@ -66,6 +66,7 @@ function booking_import_data_admin_submit($form, &$form_state)
$update_counter = 0;
$delimiter = ",";
$result_array = array();
$update_messages = array();
$datetime_fields = array('booking_outflight_origin_ts', 'booking_outflight_destination_ts', 'booking_rtrnflight_origin_ts',
'booking_rtrnflight_destination_ts');
@@ -166,9 +167,12 @@ function booking_import_data_admin_submit($form, &$form_state)
$rows = $query->execute();
//$args = $query->getArguments();
/*
watchdog('booking', "Update Query:<br />@info<br />Condition: @nid<br />Rows affected: @rows<br />Values: <br /><pre>@values</pre>",
array('@info' => (string) $query, '@nid' => $record['nid'], '@rows' => $rows, '@values' => print_r( $update_array, true) ));
*/
$update_messages[] = t("Update Query:<br />@info<br />Condition: @nid<br />Rows affected: @rows<br />Values: <br /><pre>@values</pre>", array('@info' => (string) $query, '@nid' => $record['nid'], '@rows' => $rows, '@values' => print_r( $update_array, true) ));
/*
$result_array[] = t('Setting payment for id !nid to $!price of total required $!total and status to !status',
@@ -214,6 +218,8 @@ function booking_import_data_admin_submit($form, &$form_state)
//let the user know we finished
drupal_set_message(t("Finished processing @count records from input file \"@filename\"",
array('@count' => $update_counter, '@filename' => $file->filename)));
watchdog('booking', "<pre>Data Import concluded:\n" . implode("\n", $update_messages) . "</pre>");
/*
// Make the storage of the file permanent