function pmproject_migrate_field_data in Drupal PM (Project Management) 7.3
Same name and namespace in other branches
- 8 pmproject/includes/pmproject.migrate.inc \pmproject_migrate_field_data()
- 7.2 pmproject/includes/pmproject.migrate.inc \pmproject_migrate_field_data()
Migrate pmproject node fields data to drupal user bundle.
1 call to pmproject_migrate_field_data()
- pmproject_migrate in pmproject/
includes/ pmproject.migrate.inc - Helper function for migrating between pmproject to drupal fields.
File
- pmproject/
includes/ pmproject.migrate.inc, line 69 - Migration functions for the PM Project module.
Code
function pmproject_migrate_field_data(&$sandbox) {
$results = db_select('pmproject', 'pmprj')
->fields('pmprj')
->condition('vid', $sandbox['pmproject_current_vid_of_field_being_migrated'], '>')
->range(0, PMPROJECT_MIGRATE_MAX_JOB_PER_BATCH)
->execute();
$count = 0;
foreach ($results as $pmproject) {
$count++;
$sandbox['pmproject_current_vid_of_field_being_migrated'] = $pmproject->vid;
try {
_pmproject_migrate_migrate_single_node($pmproject->nid, $pmproject->vid, $pmproject);
} catch (Exception $exc) {
watchdog('pmproject', 'See ' . __FUNCTION__ . '() ' . $exc
->getTraceAsString(), NULL, WATCHDOG_ERROR);
}
}
return empty($count);
}