summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/content_migrate/includes/content_migrate.admin.inc10
-rw-r--r--modules/content_migrate/modules/content_migrate.text.inc4
2 files changed, 11 insertions, 3 deletions
diff --git a/modules/content_migrate/includes/content_migrate.admin.inc b/modules/content_migrate/includes/content_migrate.admin.inc
index fca3870..b2e9925 100644
--- a/modules/content_migrate/includes/content_migrate.admin.inc
+++ b/modules/content_migrate/includes/content_migrate.admin.inc
@@ -9,7 +9,6 @@
* unable to be migrated due to missing modules.
*/
function content_migrate_get_options() {
-
$options = array('available' => array(), 'converted' => array(), 'missing' => array());
$field_values = content_migrate_get_field_values();
@@ -39,6 +38,7 @@ function content_migrate_get_options() {
$instance_values = content_migrate_get_instance_values(NULL, $field_name);
+
// Debug
//dsm($field_value);
//dsm($instance_values);
@@ -357,9 +357,15 @@ function _content_migrate_batch_process_migrate_data($field_name, &$context) {
$query = db_select($context['sandbox']['old_table'], 'old_table', array('fetch' => PDO::FETCH_ASSOC));
// We need new columns for bundle name, entity type, and language.
+ // See the debate going on at http://drupal.org/node/1164852.
+ // Reverting back to setting all nodes as untranslated.
+ $language = LANGUAGE_NONE;
+ if ($field['translatable']) {
+ //$language = $node['language'];
+ }
$query->addExpression("'". $node['type'] ."'", 'bundle');
$query->addExpression("'node'", 'entity_type');
- $query->addExpression("'". $node['language'] ."'", 'language');
+ $query->addExpression("'". $language ."'", 'language');
// There are new names for what were the nid and vid columns.
$query->addField('old_table', 'nid', 'entity_id');
diff --git a/modules/content_migrate/modules/content_migrate.text.inc b/modules/content_migrate/modules/content_migrate.text.inc
index 6855e86..00c5b82 100644
--- a/modules/content_migrate/modules/content_migrate.text.inc
+++ b/modules/content_migrate/modules/content_migrate.text.inc
@@ -18,7 +18,9 @@ function content_migrate_text_field_alter(&$field_value, $instance_value) {
case 'text':
// Text fields are translatable.
- $field_value['translatable'] = TRUE;
+ // See the debate going on at http://drupal.org/node/1164852.
+ // Reverting back to setting all nodes as untranslated.
+ //$field_value['translatable'] = TRUE;
switch ($instance_value['widget']['type']) {