summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-22 13:46:09 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 13:44:09 +0200
commit25c36be9010486b31315b9c4272e6d7385b07dc2 (patch)
treee0beaeafe3c6be07b3f1598d89578cb0da298baf
parent7f6a72b65d24ea3e887aa40b424db1a6cb713006 (diff)
downloadnextcloud-server-25c36be9010486b31315b9c4272e6d7385b07dc2.tar.gz
nextcloud-server-25c36be9010486b31315b9c4272e6d7385b07dc2.zip
Proper DI for ILockingProvider
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--lib/private/Server.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index c89931a2d1c..5efbcfecf32 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -113,6 +113,7 @@ use OCP\IServerContainer;
use OCP\ITempManager;
use OCP\Contacts\ContactsMenu\IActionFactory;
use OCP\IURLGenerator;
+use OCP\Lock\ILockingProvider;
use OCP\RichObjectStrings\IValidator;
use OCP\Security\IContentSecurityPolicyManager;
use OCP\Share\IShareHelper;
@@ -785,7 +786,7 @@ class Server extends ServerContainer implements IServerContainer {
$factory = new $factoryClass($this);
return $factory->getLDAPProvider();
});
- $this->registerService('LockingProvider', function (Server $c) {
+ $this->registerService(ILockingProvider::class, function (Server $c) {
$ini = $c->getIniWrapper();
$config = $c->getConfig();
$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -800,6 +801,7 @@ class Server extends ServerContainer implements IServerContainer {
}
return new NoopLockingProvider();
});
+ $this->registerAlias('LockingProvider', ILockingProvider::class);
$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
return new \OC\Files\Mount\Manager();