mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Get permissions from Contact if exists, otherwise AddressBook. Refs #457
This commit is contained in:
parent
f4d6576363
commit
abb3166e90
@ -76,6 +76,9 @@ class Contact extends VObject\VCard implements IPIMObject {
|
|||||||
case 'id':
|
case 'id':
|
||||||
$this->props['id'] = $value;
|
$this->props['id'] = $value;
|
||||||
break;
|
break;
|
||||||
|
case 'permissions':
|
||||||
|
$this->props['permissions'] = $value;
|
||||||
|
break;
|
||||||
case 'lastmodified':
|
case 'lastmodified':
|
||||||
$this->props['lastmodified'] = $value;
|
$this->props['lastmodified'] = $value;
|
||||||
break;
|
break;
|
||||||
@ -198,7 +201,9 @@ class Contact extends VObject\VCard implements IPIMObject {
|
|||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getPermissions() {
|
public function getPermissions() {
|
||||||
return $this->props['parent']->getPermissions();
|
return isset($this->props['permissions'])
|
||||||
|
? $this->props['permissions']
|
||||||
|
: $this->props['parent']->getPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user