diff options
author | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 18:16:45 -0500 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-03-15 13:11:33 +0100 |
commit | 45eb4a839d57cca6467df5256785e698ac473ef3 (patch) | |
tree | a57e2f9e2c95d564f8ee720251df537549938052 /lib | |
parent | df1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff) | |
download | nextcloud-server-45eb4a839d57cca6467df5256785e698ac473ef3.tar.gz nextcloud-server-45eb4a839d57cca6467df5256785e698ac473ef3.zip |
Refactor `OC\Server::getLockingProvider`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 3 | ||||
-rw-r--r-- | lib/private/Files/View.php | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 0c82e21e30d..1c66f3af8d2 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -96,7 +96,7 @@ class Scanner extends BasicEmitter implements IScanner { $this->storageId = $this->storage->getId(); $this->cache = $storage->getCache(); $this->cacheActive = !\OC::$server->getConfig()->getSystemValueBool('filesystem_cache_readonly', false); - $this->lockingProvider = \OC::$server->getLockingProvider(); + $this->lockingProvider = \OC::$server->get(ILockingProvider::class); $this->connection = \OC::$server->get(IDBConnection::class); } diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index 6348427cb3b..ae6a0a33d2b 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -50,6 +50,7 @@ use OCP\Files\NotFoundException; use OCP\Files\Storage\IStorage; use OCP\Files\StorageNotAvailableException; use OCP\IDBConnection; +use OCP\Lock\ILockingProvider; use Psr\Log\LoggerInterface; /** @@ -100,7 +101,7 @@ class Scanner extends PublicEmitter { $this->dispatcher = $dispatcher; $this->logger = $logger; // when DB locking is used, no DB transactions will be used - $this->useTransaction = !(\OC::$server->getLockingProvider() instanceof DBLockingProvider); + $this->useTransaction = !(\OC::$server->get(ILockingProvider::class) instanceof DBLockingProvider); } /** diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index c80b42134c4..36d7002a269 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -106,7 +106,7 @@ class View { } $this->fakeRoot = $root; - $this->lockingProvider = \OC::$server->getLockingProvider(); + $this->lockingProvider = \OC::$server->get(ILockingProvider::class); $this->lockingEnabled = !($this->lockingProvider instanceof \OC\Lock\NoopLockingProvider); $this->userManager = \OC::$server->getUserManager(); $this->logger = \OC::$server->get(LoggerInterface::class); |