From: Thomas Tanghus Date: Fri, 6 Jul 2012 11:49:04 +0000 (+0200) Subject: Make export batch size configurable. X-Git-Tag: v4.5.0beta1~74^2~225^2~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=75d01b065da91acb7512b3df82d69c8d931c50b3;p=nextcloud-server.git Make export batch size configurable. --- diff --git a/apps/contacts/export.php b/apps/contacts/export.php index ba7b06e40d2..58fdb040a5c 100644 --- a/apps/contacts/export.php +++ b/apps/contacts/export.php @@ -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);