aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Share/Share.php3
-rw-r--r--lib/public/Contacts/IManager.php2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 8d14f293e5a..86ef41a1c5c 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -36,6 +36,7 @@
namespace OC\Share;
use OCA\Files_Sharing\ShareBackend\File;
+use OCP\Contacts\IManager as IContactsManager;
use OCP\DB\Exception;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
@@ -596,7 +597,7 @@ class Share extends Constants {
$row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName();
} elseif (isset($row['share_with']) && $row['share_with'] != '' &&
$row['share_type'] === IShare::TYPE_REMOTE) {
- $addressBookEntries = \OC::$server->getContactsManager()->search($row['share_with'], ['CLOUD'], [
+ $addressBookEntries = \OC::$server->get(IContactsManager::class)->search($row['share_with'], ['CLOUD'], [
'limit' => 1,
'enumeration' => false,
'fullmatch' => false,
diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php
index 6ca349b95d0..fce09a19a33 100644
--- a/lib/public/Contacts/IManager.php
+++ b/lib/public/Contacts/IManager.php
@@ -56,7 +56,7 @@ interface IManager {
* Following function shows how to search for contacts for the name and the email address.
*
* public static function getMatchingRecipient($term) {
- * $cm = \OC::$server->getContactsManager();
+ * $cm = \OC::$server->get(\OCP\Contacts\IManager::class);
* // The API is not active -> nothing to do
* if (!$cm->isEnabled()) {
* return array();