]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make export batch size configurable.
authorThomas Tanghus <thomas@tanghus.net>
Fri, 6 Jul 2012 11:49:04 +0000 (13:49 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Fri, 6 Jul 2012 11:49:04 +0000 (13:49 +0200)
apps/contacts/export.php

index ba7b06e40d25975cb6baca94d1e2cceb99008ff7..58fdb040a5cc7b32abde67f6eab2e06c95e004ca 100644 (file)
@@ -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);