[Pkg-owncloud-commits] [php-sabredav] 13/64: Faster getMultiple implementation for carddav backend.

David Prévot taffit at moszumanska.debian.org
Thu Dec 11 15:13:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 2.2.0alpha1
in repository php-sabredav.

commit a70ae58542a9bfa3ef78fb0c6495d9a9874602c1
Author: Evert Pot <me at evertpot.com>
Date:   Fri Nov 14 01:28:45 2014 -0500

    Faster getMultiple implementation for carddav backend.
---
 lib/CardDAV/Backend/PDO.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/CardDAV/Backend/PDO.php b/lib/CardDAV/Backend/PDO.php
index d43abf5..f4b3aa9 100644
--- a/lib/CardDAV/Backend/PDO.php
+++ b/lib/CardDAV/Backend/PDO.php
@@ -276,11 +276,7 @@ class PDO extends AbstractBackend implements SyncSupport {
      */
     function getMultipleCards($addressBookId, array $uris) {
 
-        return array_map(function($uri) use ($addressBookId) {
-            return $this->getCard($addressBookId, $uri);
-        }, $uris);
-
-        $query = 'SELECT id, uri, lastmodified, etag, size FROM ' . $this->cardsTableName . ' WHERE addressbookid = ? AND uri = IN (';
+        $query = 'SELECT id, uri, lastmodified, etag, size, carddata FROM ' . $this->cardsTableName . ' WHERE addressbookid = ? AND uri IN (';
         // Inserting a whole bunch of question marks
         $query.=implode(',', array_fill(0, count($uris), '?'));
         $query.=')';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list