If exporting all, and filter is missing, use current owner

This commit is contained in:
Nathan Gray 2012-04-23 17:52:36 +00:00
parent 0e9e4ae325
commit e895274d69

View File

@ -50,11 +50,12 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
$old_app = $GLOBALS['egw_info']['flags']['currentapp'];
$GLOBALS['egw_info']['flags']['currentapp'] = 'addressbook';
if ($options['selection'] == 'use_all') {
if ($options['selection'] == 'use_all' || $options['selection'] == 'all') {
// uicontacts selection with checkbox 'use_all'
$query = $GLOBALS['egw']->session->appsession('index','addressbook');
$query['num_rows'] = -1; // all
$query['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session
if(!array_key_exists('filter',$query)) $query['filter'] = $GLOBALS['egw_info']['user']['account_id'];
$uicontacts->get_rows($query,$selection,$readonlys, true); // only return the ids
}
elseif ( $options['selection'] == 'all_contacts' ) {