From ab6366011113198536bf682df7f117c5d6463789 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 26 Apr 2011 14:43:57 +0000 Subject: [PATCH] Use default conversions, don't pass account_lid to create new groups --- admin/inc/class.admin_import_groups_csv.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.admin_import_groups_csv.inc.php b/admin/inc/class.admin_import_groups_csv.inc.php index 7053a87e9b..6d63dc38a5 100644 --- a/admin/inc/class.admin_import_groups_csv.inc.php +++ b/admin/inc/class.admin_import_groups_csv.inc.php @@ -111,6 +111,8 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { // don't import empty records if( count( array_unique( $record ) ) < 2 ) continue; + importexport_import_csv::convert($record, admin_egw_group_record::$types, 'admin'); + if ( $_definition->plugin_options['conditions'] ) { foreach ( $_definition->plugin_options['conditions'] as $condition ) { switch ( $condition['type'] ) { @@ -163,7 +165,11 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { return true; case 'update' : case 'create' : - $command = new admin_cmd_edit_group($data['account_lid'], $_data); + if(count($_data['account_members']) < 1) { + $this->errors[$record_num] = lang('You must select at least one group member.'); + return false; + } + $command = new admin_cmd_edit_group($_action == 'create' ? false : $_data['account_lid'], $_data); if($this->dry_run) { $this->results[$_action]++; return true;