function node_node_import_values_alter in Node import 6
Implementation of hook_node_import_values_alter().
File
- supported/
node.inc, line 258 - Support file for the core node module.
Code
function node_node_import_values_alter(&$values, $type, $defaults, $options, $fields, $preview) {
if (($node_type = node_import_type_is_node($type)) !== FALSE) {
if (isset($values['uid']) && drupal_strlen($values['uid']) > 0) {
if (($name = node_import_get_object('user:name', $values['uid'])) || ($name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $values['uid'])))) {
$values['name'] = $name;
node_import_set_object('user:name', $values['uid'], $name);
}
}
else {
$values['name'] = '';
}
if (isset($values['created']) && drupal_strlen($values['created']) > 0) {
$values['date'] = format_date($values['created'], 'custom', 'Y-m-d H:i:s O');
}
}
}