forked from extern/egroupware
Use automatic processing for human friendly values
This commit is contained in:
parent
630720a662
commit
fa8bf4218e
@ -133,14 +133,17 @@ class resources_import_csv implements importexport_iface_import_plugin {
|
|||||||
// Failures
|
// Failures
|
||||||
$this->errors = array();
|
$this->errors = array();
|
||||||
|
|
||||||
|
$types = importexport_export_csv::$types;
|
||||||
|
$types['select-bool'] = array('bookable');
|
||||||
|
|
||||||
while ( $record = $import_csv->get_record() ) {
|
while ( $record = $import_csv->get_record() ) {
|
||||||
$success = false;
|
$success = false;
|
||||||
|
|
||||||
// don't import empty records
|
// don't import empty records
|
||||||
if( count( array_unique( $record ) ) < 2 ) continue;
|
if( count( array_unique( $record ) ) < 2 ) continue;
|
||||||
|
|
||||||
// Automatically handle text categories without explicit translation
|
// Automatically handle human friendly values
|
||||||
$record['cat_id'] = importexport_helper_functions::cat_name2id($record['cat_id']);
|
importexport_import_csv::convert($record, $types, 'resources', $lookups);
|
||||||
|
|
||||||
if ( $_definition->plugin_options['conditions'] ) {
|
if ( $_definition->plugin_options['conditions'] ) {
|
||||||
foreach ( $_definition->plugin_options['conditions'] as $condition ) {
|
foreach ( $_definition->plugin_options['conditions'] as $condition ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user