diff --git a/migrate_example/wine.inc b/migrate_example/wine.inc index 45ef6baf3de4fc53a7349f66660f8f1da9d82d73..5272df58e577fc22a9367a4daeb04792c41b1e7c 100644 --- a/migrate_example/wine.inc +++ b/migrate_example/wine.inc @@ -323,7 +323,8 @@ class WineProducerXMLMigration extends XMLMigration { MigrateDestinationNode::getKeySchema() ); - $xml_folder = url(drupal_get_path('module', 'migrate_example') . '/xml/'); + // This can also be an URL instead of a file path. + $xml_folder = DRUPAL_ROOT . '/' . drupal_get_path('module', 'migrate_example') . '/xml/'; $list_url = $xml_folder . 'index.xml'; // Each ID retrieved from the list URL will be plugged into :id in the // item URL to fetch the specific objects. diff --git a/plugins/destinations/fields.inc b/plugins/destinations/fields.inc index c776b74f64dd0c5138e4abaa797af7d78154558a..cffd6251f7ac443b33a2e9cd03049ae50804df71 100644 --- a/plugins/destinations/fields.inc +++ b/plugins/destinations/fields.inc @@ -256,7 +256,7 @@ class MigrateFileFieldHandler extends MigrateFieldHandler { break; case 'file_move': // file_move() does a copy then delete which slow. So we implement our own. - if (file_prepare_directory($destination_dir)) { + if (file_prepare_directory($destination_dir, FILE_CREATE_DIRECTORY)) { if (rename($source->uri, $real_destination_file)) { $file = clone $source; $file->fid = NULL;