function _aat_legacy_migrate_field_from_d5 in Amazon Product Advertisement API 6
Batch Operation Callback
1 string reference to '_aat_legacy_migrate_field_from_d5'
- aat_legacy_import_data in aat_legacy/
aat_legacy.module - Create a CCK field for each node type that had Amazon link in D5. Then populate it.
File
- aat_legacy/
aat_legacy.d5-migrate.inc, line 10 - Migration for the amazonnode and related item links from D5 amazontools.
Code
function _aat_legacy_migrate_field_from_d5($item, &$context) {
if (!isset($context['sandbox']['progress'])) {
$context['sandbox']['progress'] = 0;
$context['sandbox']['current_node'] = 0;
if ($node = _aat_legacy_migrate_from_d5($item['nid'], $item['ntype'])) {
$context['results'][$node->nid] = $node->title;
$context['sandbox']['progress']++;
$context['sandbox']['current_node'] = $node->nid;
$context['message'] = t('Processing nid <a href="!url">%nid</a>, %title', array(
'!url' => url("node/{$node->nid}"),
'%nid' => $node->nid,
'%title' => $node->title,
));
}
}
}