summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Stevenson2011-03-18 01:07:08 (GMT)
committer Karen Stevenson2011-03-18 01:07:08 (GMT)
commitd961039185abed6313cd05f452183d8e13982159 (patch)
tree2bbee1c6a04ff2b61cbe7e005533197dc29c9a52
parent553b728beb8ee7ac931c858cf8c89b706b1eb99c (diff)
Issue #1093844 Make sure settings with changed names are configured right.
-rw-r--r--modules/content_migrate/modules/content_migrate.filefield.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/content_migrate/modules/content_migrate.filefield.inc b/modules/content_migrate/modules/content_migrate.filefield.inc
index bb96e21..1f5cb91 100644
--- a/modules/content_migrate/modules/content_migrate.filefield.inc
+++ b/modules/content_migrate/modules/content_migrate.filefield.inc
@@ -49,12 +49,13 @@ function content_migrate_filefield_instance_alter(&$instance_value, $field_value
$instance_value['widget']['type'] = 'image';
// Most settings became instance settings instead of widget settings, with a couple name changes.
- $instance_value['settings']['file_directory'] = $instance_value['widget']['settings']['file_path'];
+ $instance_value['settings']['file_directory'] = isset($instance_value['widget']['settings']['file_path']) ? $instance_value['widget']['settings']['file_path'] : '';
unset($instance_value['widget']['settings']['file_path']);
- $instance_value['settings']['file_extensions'] = $instance_value['widget']['settings']['file_extensions'];
+ $instance_value['settings']['max_filesize'] = isset($instance_value['widget']['settings']['max_filesize_per_file']) ? $instance_value['widget']['settings']['max_filesize_per_file'] : 0;
+ unset($instance_value['widget']['settings']['max_filesize_per_file']);
+ $instance_value['settings']['file_extensions'] = isset($instance_value['widget']['settings']['file_extensions']) ? $instance_value['widget']['settings']['file_extensions'] : '';
unset($instance_value['widget']['settings']['file_extensions']);
$settings = array(
- 'max_filesize' => 0,
'max_resolution' => 0,
'min_resolution' => 0,
);