From fa8bf4218ef7df5e95a129e0299a0e683f00bf0e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 4 Apr 2011 19:07:06 +0000 Subject: [PATCH] Use automatic processing for human friendly values --- resources/inc/class.resources_import_csv.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/inc/class.resources_import_csv.inc.php b/resources/inc/class.resources_import_csv.inc.php index 1b1832a5fe..1c280a6e57 100644 --- a/resources/inc/class.resources_import_csv.inc.php +++ b/resources/inc/class.resources_import_csv.inc.php @@ -133,14 +133,17 @@ class resources_import_csv implements importexport_iface_import_plugin { // Failures $this->errors = array(); + $types = importexport_export_csv::$types; + $types['select-bool'] = array('bookable'); + while ( $record = $import_csv->get_record() ) { $success = false; // don't import empty records if( count( array_unique( $record ) ) < 2 ) continue; - // Automatically handle text categories without explicit translation - $record['cat_id'] = importexport_helper_functions::cat_name2id($record['cat_id']); + // Automatically handle human friendly values + importexport_import_csv::convert($record, $types, 'resources', $lookups); if ( $_definition->plugin_options['conditions'] ) { foreach ( $_definition->plugin_options['conditions'] as $condition ) {