public function DrupalNode5Migration::prepareRow in Drupal-to-Drupal data migration 7.2
Called after the query data is fetched - we'll use this to populate the source row with the CCK fields.
Overrides DrupalNodeMigration::prepareRow
File
- d5/
node.inc, line 99 - Implementation of DrupalNodeMigration for Drupal 5 sources.
Class
- DrupalNode5Migration
- Handling specific to a Drupal 5 source for nodes.
Code
public function prepareRow($row) {
if (parent::prepareRow($row) === FALSE) {
return FALSE;
}
// Convert the default field names to the nice-looking ones.
foreach ($this->fixFieldNames as $clean => $display) {
if (isset($row->{$clean})) {
$row->{$display} = $row->{$clean};
unset($row->{$clean});
}
}
// Don't populate summary if the teaser matches the generated summary.
if (empty($row->teaser) || $row->teaser == text_summary($row->body)) {
$row->teaser = '';
}
}