Commit 575ce50d authored by KarenS's avatar KarenS
Browse files

Fix some remaining problems from trying to add instance data to the data alter...

Fix some remaining problems from trying to add instance data to the data alter field. Some missing documentation, some missing variables, some incorrectly computed values.
parent 23dfef6c
......@@ -64,7 +64,7 @@ function hook_content_migrate_instance_alter(&$instance_value, $field_value) {
* @param $field
*
*/
function hook_content_migrate_data_record_alter(&$record, $field) {
function hook_content_migrate_data_record_alter(&$record, $field, $instance) {
switch($field['type']) {
case 'file':
// Map D6 filefield field columns to D7 file field columns. Note the data
......
......@@ -205,10 +205,10 @@ function content_migrate_content_migrate_instance_alter(&$instance_value, $field
*
* Tweaks individual records in a field.
*/
function content_migrate_content_migrate_data_record_alter(&$record, $field) {
function content_migrate_content_migrate_data_record_alter(&$record, $field, $instance) {
module_load_include('inc', 'content_migrate', 'modules/content_migrate.filefield');
content_migrate_filefield_data_record_alter($record, $field);
content_migrate_filefield_data_record_alter($record, $field, $instance);
}
......
......@@ -328,8 +328,8 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
return;
}
$field = $context['sandbox']['fields'][$field_name];
$instance = $context['sandbox']['instances'][$field_name][$node['type']];
$field = field_info_field($field_name);
$instance = field_info_instance('node', $field_name, $node['type']);
// Construct an record to insert into the new field table
// from the data in the old table.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment