aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/SharedMount.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/SharedMount.php')
-rw-r--r--apps/files_sharing/lib/SharedMount.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index 5f7e8f376f1..fc5b533af64 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -17,6 +17,7 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\InvalidateMountCacheEvent;
use OCP\Files\Storage\IStorageFactory;
use OCP\ICache;
+use OCP\IDBConnection;
use OCP\IUser;
use OCP\Server;
use OCP\Share\Events\VerifyMountPointEvent;
@@ -121,7 +122,7 @@ class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint
foreach ($this->groupedShares as $tmpShare) {
$tmpShare->setTarget($newPath);
- \OC::$server->getShareManager()->moveShare($tmpShare, $this->user->getUID());
+ Server::get(\OCP\Share\IManager::class)->moveShare($tmpShare, $this->user->getUID());
}
$this->eventDispatcher->dispatchTyped(new InvalidateMountCacheEvent($this->user));
@@ -249,7 +250,7 @@ class SharedMount extends MountPoint implements MoveableMount, ISharedMountPoint
if (!is_null($this->getShare()->getNodeCacheEntry())) {
return $this->getShare()->getNodeCacheEntry()->getStorageId();
} else {
- $builder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $builder = Server::get(IDBConnection::class)->getQueryBuilder();
$query = $builder->select('storage')
->from('filecache')