mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Make export batch size configurable.
This commit is contained in:
parent
cafbd02337
commit
75d01b065d
1 changed files with 3 additions and 2 deletions
|
|
@ -19,11 +19,12 @@ if(isset($bookid)){
|
|||
header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf');
|
||||
|
||||
$start = 0;
|
||||
while($cardobjects = OC_Contacts_VCard::all($bookid, $start, 20)){
|
||||
$batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20);
|
||||
while($cardobjects = OC_Contacts_VCard::all($bookid, $start, $batchsize)){
|
||||
foreach($cardobjects as $card) {
|
||||
echo $card['carddata'] . $nl;
|
||||
}
|
||||
$start += 20;
|
||||
$start += $batchsize;
|
||||
}
|
||||
}elseif(isset($contactid)){
|
||||
$data = OC_Contacts_App::getContactObject($contactid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue