From 6b5dc22ff1f4c391f46cd1664af1829df8fe167f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Thu, 28 Jun 2007 10:07:16 +0000 Subject: [PATCH] Welcome to Darwin! fix: owner field in adb is owner and _not_ contact_owner fix: selector for cli exports --- .../importexport/class.export_contacts_csv.inc.php | 8 ++++++-- .../importexport/class.import_contacts_csv.inc.php | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addressbook/importexport/class.export_contacts_csv.inc.php b/addressbook/importexport/class.export_contacts_csv.inc.php index 7a12866d0c..1919ed9b9a 100644 --- a/addressbook/importexport/class.export_contacts_csv.inc.php +++ b/addressbook/importexport/class.export_contacts_csv.inc.php @@ -32,12 +32,16 @@ class export_contacts_csv implements iface_export_plugin { $uicontacts = new uicontacts(); $selection = array(); - if ($options['selection'] == 'use_all') { + if ($options['selection'] == 'use_all') { + // uicontacts selection with checkbox 'use_all' $query = $GLOBALS['egw']->session->appsession('index','addressbook'); $query['num_rows'] = -1; // all $uicontacts->get_rows($query,$selection,$readonlys,true); // true = only return the id's } - else { + elseif ( $options['selection'] == 'all_contacts' ) { + $selection = ExecMethod('addressbook.bocontacts.search',array()); + //$uicontacts->get_rows($query,$selection,$readonlys,true); + } else { $selection = explode(',',$options['selection']); } diff --git a/addressbook/importexport/class.import_contacts_csv.inc.php b/addressbook/importexport/class.import_contacts_csv.inc.php index c6aeaaf8c8..190763e052 100644 --- a/addressbook/importexport/class.import_contacts_csv.inc.php +++ b/addressbook/importexport/class.import_contacts_csv.inc.php @@ -125,8 +125,8 @@ class import_contacts_csv implements iface_import_plugin { if( count( array_unique( $record ) ) < 2 ) continue; if ( $_definition->plugin_options['contact_owner'] != -1 ) { - $record['contact_owner'] = $_definition->plugin_options['contact_owner']; - } else unset( $record['contact_owner'] ); + $record['owner'] = $_definition->plugin_options['contact_owner']; + } else unset( $record['owner'] ); if ( $_definition->plugin_options['conditions'] ) { foreach ( $_definition->plugin_options['conditions'] as $condition ) {