From 75d01b065da91acb7512b3df82d69c8d931c50b3 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 6 Jul 2012 13:49:04 +0200 Subject: [PATCH] Make export batch size configurable. --- apps/contacts/export.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.39.5