mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Make addressbookprovider compatible with older version of php
This commit is contained in:
parent
db863a4986
commit
29fa35760a
@ -62,7 +62,8 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
||||
* @return string defining the technical unique key
|
||||
*/
|
||||
public function getKey() {
|
||||
return $this->getAddressbook()['uri'];
|
||||
$book = $this->getAddressbook();
|
||||
return $book['uri'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,14 +71,16 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDisplayName() {
|
||||
return $this->getAddressbook()['displayname'];
|
||||
$book = $this->getAddressbook();
|
||||
return $book['displayname'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPermissions() {
|
||||
return $this->getAddressbook()['permissions'];
|
||||
$book = $this->getAddressbook();
|
||||
return $book['permissions'];
|
||||
}
|
||||
|
||||
private function getProperty(&$results, $row) {
|
||||
@ -268,4 +271,4 @@ class AddressbookProvider implements \OCP\IAddressBook {
|
||||
}
|
||||
return VCard::delete($id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user