Index: branches/RC/core/units/admin/admin_config.php =================================================================== diff -u -r9639 -r10665 --- branches/RC/core/units/admin/admin_config.php (.../admin_config.php) (revision 9639) +++ branches/RC/core/units/admin/admin_config.php (.../admin_config.php) (revision 10665) @@ -56,13 +56,16 @@ 'Fields' => Array(), // we need empty array because kernel doesn't use virtual fields else 'VirtualFields' => Array ( - 'ImportFile' => Array( - 'type'=>'string', 'formatter'=>'kUploadFormatter', - 'max_size'=>MAX_UPLOAD_SIZE, // in Bytes ! - 'file_types'=>'*.csv', 'files_description'=>'!la_CSVFiles!', - 'upload_dir'=>'/system/import/', // relative to project's home - 'multiple'=>false, // false or max number of files - will be stored as serialized array of paths - 'direct_links'=>false, // use direct file urls or send files through wrapper (requires mod_mime_magic) + 'ImportFile' => Array ( + 'type' => 'string', + 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, // in Bytes ! + 'error_msgs' => Array ( + 'cant_open_file' => '!la_error_CantOpenFile!', + 'no_matching_columns' => '!la_error_NoMatchingColumns!', + ), + 'file_types' => '*.csv', 'files_description' => '!la_CSVFiles!', + 'upload_dir' => '/system/import/', // relative to project's home + 'multiple' => false, 'direct_links' => false, 'default' => null, ), ), Index: branches/RC/core/admin_templates/import/import_start.tpl =================================================================== diff -u --- branches/RC/core/admin_templates/import/import_start.tpl (revision 0) +++ branches/RC/core/admin_templates/import/import_start.tpl (revision 10665) @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + + + + +
+
+ + +" /> +" /> + + \ No newline at end of file Index: branches/RC/core/admin_templates/export/export_complete.tpl =================================================================== diff -u --- branches/RC/core/admin_templates/export/export_complete.tpl (revision 0) +++ branches/RC/core/admin_templates/export/export_complete.tpl (revision 10665) @@ -0,0 +1,23 @@ + + +';"> + + + + + + + + "> + + + "> + + +
+ "> +
+ " class="button" onclick="window.close();"/> +
+ + \ No newline at end of file Index: branches/RC/core/admin_templates/import/import_complete.tpl =================================================================== diff -u --- branches/RC/core/admin_templates/import/import_complete.tpl (revision 0) +++ branches/RC/core/admin_templates/import/import_complete.tpl (revision 10665) @@ -0,0 +1,37 @@ + + + + + + + + + + + "> + + + + "> + + + "> + + + + "> + + +
+ : + , + +
+ : +
+ +
+ " class="button" onclick="window.location.href='';"/> +
+ + \ No newline at end of file Index: branches/RC/core/admin_templates/export/export_progress.tpl =================================================================== diff -u --- branches/RC/core/admin_templates/export/export_progress.tpl (revision 0) +++ branches/RC/core/admin_templates/export/export_progress.tpl (revision 10665) @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + \ No newline at end of file Index: branches/RC/core/admin_templates/import/import_progress.tpl =================================================================== diff -u --- branches/RC/core/admin_templates/import/import_progress.tpl (revision 0) +++ branches/RC/core/admin_templates/import/import_progress.tpl (revision 10665) @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + \ No newline at end of file Index: branches/RC/core/kernel/utility/formatters/upload_formatter.php =================================================================== diff -u -r10579 -r10665 --- branches/RC/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 10579) +++ branches/RC/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 10665) @@ -25,11 +25,10 @@ */ function Parse($value, $field_name, &$object) { - $ret = ''; + $ret = !is_array($value) ? $value : ''; $options = $object->GetFieldOptions($field_name); - if(getArrayValue($options, 'upload_dir')) - { + if (getArrayValue($options, 'upload_dir')) { $this->DestinationPath = $options['upload_dir']; $this->FullPath = FULL_PATH.$this->DestinationPath; } @@ -49,6 +48,7 @@ $value['upload'] = implode('|', $n_upload); // $value['tmp_ids'] = implode('|', $n_ids); } + if (!$value['tmp_ids']) { $uploaded_files = getArrayValue($value, 'upload'); if (!$uploaded_files && getArrayValue($options, 'required')) { @@ -149,7 +149,9 @@ } } else { - if (getArrayValue($options, 'required')) { + $required_error = is_array($value) || (!is_array($value) && !$value); // input type="file" OR just setting filename (during CSV import) + + if ($required_error && getArrayValue($options, 'required')) { $object->SetError($field_name, 'required'); } } @@ -166,6 +168,7 @@ { $single_mapping = Array ( 'file_urls' => 'full_url', + 'file_paths' => 'full_path', 'file_sizes' => 'file_size', 'files_resized' => 'resize', 'wms' => 'wm', @@ -194,7 +197,7 @@ $format = isset($options['format']) ? $options['format'] : false; } - if ($format && preg_match('/(file_urls|file_names|file_sizes|files_resized|wms)(.*)/', $format, $regs)) { + if ($format && preg_match('/(file_urls|file_paths|file_names|file_sizes|files_resized|wms)(.*)/', $format, $regs)) { if (!$value || $format == 'file_names') { // storage format matches display format OR no value return $value;