diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-06 13:49:04 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-06 13:49:04 +0200 |
commit | 75d01b065da91acb7512b3df82d69c8d931c50b3 (patch) | |
tree | e35bcfe7fe75dcf0d138c05b763591391a2b8440 /apps | |
parent | cafbd023379073623295d11ae06be55a5f2cb569 (diff) | |
download | nextcloud-server-75d01b065da91acb7512b3df82d69c8d931c50b3.tar.gz nextcloud-server-75d01b065da91acb7512b3df82d69c8d931c50b3.zip |
Make export batch size configurable.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/export.php | 5 |
1 files 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); |