mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
addressbook/export: fix for headerline gets repeated multiple times, when export is set to no for addressbook, but user is exemted from limitations
This commit is contained in:
parent
279b934746
commit
87ac5880db
@ -40,7 +40,8 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
|
|||||||
|
|
||||||
// Addressbook defines its own export imits
|
// Addressbook defines its own export imits
|
||||||
$limit_exception = bo_merge::is_export_limit_excepted();
|
$limit_exception = bo_merge::is_export_limit_excepted();
|
||||||
$export_limit = $export_object->export_limit = bo_merge::getExportLimit($app='addressbook');
|
$export_limit = bo_merge::getExportLimit($app='addressbook');
|
||||||
|
if (!$limit_exception) $export_object->export_limit = $export_limit; // we may not need that after all
|
||||||
if($export_limit == 'no' && !$limit_exception) {
|
if($export_limit == 'no' && !$limit_exception) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -69,6 +70,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
|
|||||||
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) {
|
if(bo_merge::hasExportLimit($export_limit) && !$limit_exception) {
|
||||||
$selection = array_slice($selection, 0, $export_limit);
|
$selection = array_slice($selection, 0, $export_limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($options['explode_multiselects']) {
|
if($options['explode_multiselects']) {
|
||||||
$customfields = config::get_customfields('addressbook');
|
$customfields = config::get_customfields('addressbook');
|
||||||
$additional_fields = array();
|
$additional_fields = array();
|
||||||
@ -202,11 +204,11 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
|
|||||||
if($options['convert']) {
|
if($options['convert']) {
|
||||||
importexport_export_csv::convert($contact, addressbook_egw_record::$types, 'addressbook');
|
importexport_export_csv::convert($contact, addressbook_egw_record::$types, 'addressbook');
|
||||||
} else {
|
} else {
|
||||||
// Implode arrays, so they don't say 'Array'
|
// Implode arrays, so they don't say 'Array'
|
||||||
foreach($contact->get_record_array() as $key => $value) {
|
foreach($contact->get_record_array() as $key => $value) {
|
||||||
if(is_array($value)) $contact->$key = implode(',', $value);
|
if(is_array($value)) $contact->$key = implode(',', $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$export_object->export_record($contact);
|
$export_object->export_record($contact);
|
||||||
unset($contact);
|
unset($contact);
|
||||||
|
Loading…
Reference in New Issue
Block a user