fix data import not using nid
This commit is contained in:
@@ -157,8 +157,8 @@ function booking_import_data_admin_submit($form, &$form_state)
|
|||||||
// Pre-process some data
|
// Pre-process some data
|
||||||
foreach($fields_to_import as $field) {
|
foreach($fields_to_import as $field) {
|
||||||
//make sure to skip the nid field since we can't update that
|
//make sure to skip the nid field since we can't update that
|
||||||
if ($field == 'nid') {
|
if (in_array($field, $unique_fields)) {
|
||||||
//do nothing
|
//Don't add this identifier to the list of updates
|
||||||
}
|
}
|
||||||
//convert the booking status to the number used internally
|
//convert the booking status to the number used internally
|
||||||
elseif ($field == 'booking_status') {
|
elseif ($field == 'booking_status') {
|
||||||
@@ -205,10 +205,11 @@ function booking_import_data_admin_submit($form, &$form_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//handle study group processing
|
//handle study group processing
|
||||||
$update_text .= _booking_import_studygroup_info($record['nid'], $studygroups_update_array, $studygroup_roles_update_array);
|
if ($key == 'nid') {
|
||||||
|
$update_text .= _booking_import_studygroup_info($record['nid'], $studygroups_update_array, $studygroup_roles_update_array);
|
||||||
|
drupal_set_message(t("Updating record !nid as follows: !update", array('!nid' => $record['nid'], '!update' => $update_text)));
|
||||||
|
}
|
||||||
|
|
||||||
drupal_set_message(t("Updating record !nid as follows: !update", array('!nid' => $record['nid'], '!update' => $update_text)));
|
|
||||||
|
|
||||||
//$args = $query->getArguments();
|
//$args = $query->getArguments();
|
||||||
/*
|
/*
|
||||||
watchdog('booking', "Update Query:<br />@info<br />Condition: @nid<br />Rows affected: @rows<br />Values: <br /><pre>@values</pre>",
|
watchdog('booking', "Update Query:<br />@info<br />Condition: @nid<br />Rows affected: @rows<br />Values: <br /><pre>@values</pre>",
|
||||||
|
Reference in New Issue
Block a user