You are here

protected function WordPressMigration::disablePathauto in WordPress Migrate 7.2

Work-around for http://drupal.org/node/936222 - make sure our node_save() calls not governed by the node destination class do not overwrite aliases.

Parameters

$node:

3 calls to WordPressMigration::disablePathauto()
WordPressAttachment::complete in ./wordpress_attachment.inc
Called after file object is saved - maintain a mapping from the URL on the original WordPress blog to the URI in Drupal.
WordPressAttachment::postImport in ./wordpress_attachment.inc
Called after all attachments are imported - fix up references to the imported attachments in node bodies.
WordPressPage::postImport in ./wordpress_item.inc
Called after completion of the page migration. We review any nodes with links that couldn't be resolved at migration time (presumably because they refer to nodes not yet migrated) and see if we can resolve them now.

File

./wordpress.inc, line 144
Implementation of migration from WordPress into Drupal

Class

WordPressMigration
@file Implementation of migration from WordPress into Drupal

Code

protected function disablePathauto($node) {
  $node->path['pathauto'] = 0;
  if (!isset($node->path['alias'])) {
    $node->path['alias'] = '';
  }
}