function content_migrate_storage_type in Content Construction Kit (CCK) 7.3
Helper function for finding the type of table used for storing the D6 field data.
Parameters
$field_value:
$instance_value:
2 calls to content_migrate_storage_type()
- content_migrate_old_table in modules/
content_migrate/ content_migrate.module - Helper function for finding the table name used to store the D6 field data.
- _content_migrate_batch_process_migrate_data in modules/
content_migrate/ includes/ content_migrate.admin.inc - Batch operation callback to migrate data. Copy old table data to new field table.
File
- modules/
content_migrate/ content_migrate.module, line 81 - Code For D6 to D7 field data update.
Code
function content_migrate_storage_type($field_value) {
$storage = CONTENT_DB_STORAGE_PER_CONTENT_TYPE;
if (isset($field_value['db_storage'])) {
return $field_value['db_storage'];
}
elseif ($field_value['cardinality'] != 1 || $field_value['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {
$storage = CONTENT_DB_STORAGE_PER_FIELD;
}
else {
$instance_values = content_migrate_get_instance_values(NULL, $field_value['field_name']);
foreach ($instance_values as $bundle => $instance_value) {
if (isset($instance_value['messages'])) {
$messages = array_merge($messages, $instance_value['messages']);
unset($instance_values[$bundle]['messages']);
}
}
if (count($instance_values) > 1) {
$storage = CONTENT_DB_STORAGE_PER_FIELD;
}
}
return $storage;
}