From 7c14888987faf6c62f1aeb1304d1fcef4b1052ce Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Sun, 30 May 2021 17:14:50 +0200 Subject: [PATCH] fix listing --- abook_class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/abook_class.php b/abook_class.php index fbfabda..a02f2cf 100755 --- a/abook_class.php +++ b/abook_class.php @@ -115,11 +115,11 @@ class abook_carddav extends addressbook_backend { if(!isset($vcard->EMAIL)) { continue; } if($this->writeable) { // all one line per each vcard - $ret[] = $this.vcard2sq($uri, $vcard); + $ret[] = $this->vcard2sq($uri, $vcard); } else { foreach($vcard->EMAIL as $email) { // all one line per each email - $ret[] = $this.vcard2sq($uri, $vcard, $email); + $ret[] = $this->vcard2sq($uri, $vcard, $email); } } if($limit == 1) { return $ret[0]; } @@ -181,7 +181,7 @@ class abook_carddav extends addressbook_backend { vcard(VCard): VCard as Sabre/VObject VCard */ $vcard = $one['vcard']; - return vcard2sq($uri, $vcard); + return $this->vcard2sq($uri, $vcard); } if($field == SM_ABOOK_FIELD_FIRSTNAME) { // TODO: this will be harder @@ -205,6 +205,7 @@ class abook_carddav extends addressbook_backend { * @return array of addresses (arrays) */ function list_addr() { + if(!$this->listing) { return array(); } // list all addresses having an email return $this->run_query(['EMAIL' => "//"]); }