aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/AddressBook.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CardDAV/AddressBook.php')
-rw-r--r--apps/dav/lib/CardDAV/AddressBook.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php
index 76633511504..1c13ac00aec 100644
--- a/apps/dav/lib/CardDAV/AddressBook.php
+++ b/apps/dav/lib/CardDAV/AddressBook.php
@@ -22,6 +22,8 @@
namespace OCA\DAV\CardDAV;
use OCA\DAV\DAV\Sharing\IShareable;
+use OCP\IL10N;
+use Sabre\CardDAV\Backend\BackendInterface;
use Sabre\CardDAV\Card;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
@@ -30,6 +32,22 @@ use Sabre\DAV\PropPatch;
class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
/**
+ * AddressBook constructor.
+ *
+ * @param BackendInterface $carddavBackend
+ * @param array $addressBookInfo
+ * @param IL10N $l10n
+ */
+ public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) {
+ parent::__construct($carddavBackend, $addressBookInfo);
+
+ if ($this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI &&
+ $this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME) {
+ $this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
+ }
+ }
+
+ /**
* Updates the list of shares.
*
* The first array is a list of people that are to be added to the