mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge branch 'master' into refactor/OC-Server-getCloudFederationFactory
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
This commit is contained in:
commit
7ecd4747cf
22 changed files with 52 additions and 39 deletions
|
|
@ -90,7 +90,7 @@ class Scan extends Base {
|
|||
->addOption(
|
||||
'path',
|
||||
'p',
|
||||
InputArgument::OPTIONAL,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'limit rescan to this path, eg. --path="/alice/files/Music", the user_id is determined by the path and the user_id parameter and --all are ignored'
|
||||
)
|
||||
->addOption(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class Redis extends Cache implements IMemcacheTTL {
|
|||
*/
|
||||
public function getCache() {
|
||||
if (is_null(self::$cache)) {
|
||||
self::$cache = \OC::$server->getGetRedisFactory()->getInstance();
|
||||
self::$cache = \OC::$server->get('RedisFactory')->getInstance();
|
||||
}
|
||||
return self::$cache;
|
||||
}
|
||||
|
|
@ -209,7 +209,7 @@ class Redis extends Cache implements IMemcacheTTL {
|
|||
}
|
||||
|
||||
public static function isAvailable(): bool {
|
||||
return \OC::$server->getGetRedisFactory()->isAvailable();
|
||||
return \OC::$server->get('RedisFactory')->isAvailable();
|
||||
}
|
||||
|
||||
protected function evalLua(string $scriptName, array $keys, array $args) {
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ use OCP\Security\IHasher;
|
|||
*
|
||||
* Usage:
|
||||
* // Hashing a message
|
||||
* $hash = \OC::$server->getHasher()->hash('MessageToHash');
|
||||
* $hash = \OC::$server->get(\OCP\Security\IHasher::class)->hash('MessageToHash');
|
||||
* // Verifying a message - $newHash will contain the newly calculated hash
|
||||
* $newHash = null;
|
||||
* var_dump(\OC::$server->getHasher()->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
|
||||
* var_dump(\OC::$server->get(\OCP\Security\IHasher::class)->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
|
||||
* var_dump($newHash);
|
||||
*
|
||||
* @package OC\Security
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
$provider,
|
||||
$c->get(\OCP\IConfig::class),
|
||||
$c->get(ISecureRandom::class),
|
||||
$c->getLockdownManager(),
|
||||
$c->get('LockdownManager'),
|
||||
$c->get(LoggerInterface::class),
|
||||
$c->get(IEventDispatcher::class)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ use OCP\AppFramework\Utility\ITimeFactory;
|
|||
use OCP\Defaults;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\Federation\ICloudFederationFactory;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\IServerContainer;
|
||||
use OCP\Security\IHasher;
|
||||
use OCP\Share\IManager;
|
||||
use OCP\Share\IProviderFactory;
|
||||
use OCP\Share\IShare;
|
||||
|
|
@ -101,7 +103,7 @@ class ProviderFactory implements IProviderFactory {
|
|||
$this->serverContainer->getDatabaseConnection(),
|
||||
$this->serverContainer->getUserManager(),
|
||||
$this->serverContainer->getGroupManager(),
|
||||
$this->serverContainer->getLazyRootFolder(),
|
||||
$this->serverContainer->get(IRootFolder::class),
|
||||
$this->serverContainer->getMailer(),
|
||||
$this->serverContainer->query(Defaults::class),
|
||||
$this->serverContainer->getL10NFactory(),
|
||||
|
|
@ -157,7 +159,7 @@ class ProviderFactory implements IProviderFactory {
|
|||
$notifications,
|
||||
$tokenHandler,
|
||||
$l,
|
||||
$this->serverContainer->getLazyRootFolder(),
|
||||
$this->serverContainer->get(IRootFolder::class),
|
||||
$this->serverContainer->getConfig(),
|
||||
$this->serverContainer->getUserManager(),
|
||||
$this->serverContainer->getCloudIdManager(),
|
||||
|
|
@ -192,7 +194,7 @@ class ProviderFactory implements IProviderFactory {
|
|||
$this->serverContainer->getDatabaseConnection(),
|
||||
$this->serverContainer->getSecureRandom(),
|
||||
$this->serverContainer->getUserManager(),
|
||||
$this->serverContainer->getLazyRootFolder(),
|
||||
$this->serverContainer->get(IRootFolder::class),
|
||||
$this->serverContainer->getL10N('sharebymail'),
|
||||
$this->serverContainer->get(LoggerInterface::class),
|
||||
$this->serverContainer->getMailer(),
|
||||
|
|
@ -200,7 +202,7 @@ class ProviderFactory implements IProviderFactory {
|
|||
$this->serverContainer->getActivityManager(),
|
||||
$settingsManager,
|
||||
$this->serverContainer->query(Defaults::class),
|
||||
$this->serverContainer->getHasher(),
|
||||
$this->serverContainer->get(IHasher::class),
|
||||
$this->serverContainer->get(IEventDispatcher::class),
|
||||
$this->serverContainer->get(IManager::class)
|
||||
);
|
||||
|
|
@ -234,7 +236,7 @@ class ProviderFactory implements IProviderFactory {
|
|||
$this->serverContainer->getDatabaseConnection(),
|
||||
$this->serverContainer->getSecureRandom(),
|
||||
$this->serverContainer->getUserManager(),
|
||||
$this->serverContainer->getLazyRootFolder(),
|
||||
$this->serverContainer->get(IRootFolder::class),
|
||||
$this->serverContainer->getL10N('circles'),
|
||||
$this->serverContainer->getLogger(),
|
||||
$this->serverContainer->getURLGenerator()
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ use OC\Files\Filesystem;
|
|||
use OCP\Files\File;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\InvalidPathException;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Files\NotPermittedException;
|
||||
use OCP\IRequest;
|
||||
|
|
@ -118,7 +119,7 @@ class Streamer {
|
|||
// prevent absolute dirs
|
||||
$internalDir = ltrim($internalDir, '/');
|
||||
|
||||
$userFolder = \OC::$server->getRootFolder()->get(Filesystem::getRoot());
|
||||
$userFolder = \OC::$server->get(IRootFolder::class)->get(Filesystem::getRoot());
|
||||
/** @var Folder $dirNode */
|
||||
$dirNode = $userFolder->get($dir);
|
||||
$files = $dirNode->getDirectoryListing();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ use OCP\Cache\CappedMemoryCache;
|
|||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\Security\Events\ValidatePasswordPolicyEvent;
|
||||
use OCP\Security\IHasher;
|
||||
use OCP\User\Backend\ABackend;
|
||||
use OCP\User\Backend\ICheckPasswordBackend;
|
||||
use OCP\User\Backend\ICountUsersBackend;
|
||||
|
|
@ -130,7 +131,7 @@ class Database extends ABackend implements
|
|||
$qb->insert($this->table)
|
||||
->values([
|
||||
'uid' => $qb->createNamedParameter($uid),
|
||||
'password' => $qb->createNamedParameter(\OC::$server->getHasher()->hash($password)),
|
||||
'password' => $qb->createNamedParameter(\OC::$server->get(IHasher::class)->hash($password)),
|
||||
'uid_lower' => $qb->createNamedParameter(mb_strtolower($uid)),
|
||||
]);
|
||||
|
||||
|
|
@ -197,7 +198,7 @@ class Database extends ABackend implements
|
|||
if ($this->userExists($uid)) {
|
||||
$this->eventDispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password));
|
||||
|
||||
$hasher = \OC::$server->getHasher();
|
||||
$hasher = \OC::$server->get(IHasher::class);
|
||||
$hashedPassword = $hasher->hash($password);
|
||||
|
||||
$return = $this->updatePassword($uid, $hashedPassword);
|
||||
|
|
@ -353,7 +354,7 @@ class Database extends ABackend implements
|
|||
if ($found && is_array($this->cache[$loginName])) {
|
||||
$storedHash = $this->cache[$loginName]['password'];
|
||||
$newHash = '';
|
||||
if (\OC::$server->getHasher()->verify($password, $storedHash, $newHash)) {
|
||||
if (\OC::$server->get(IHasher::class)->verify($password, $storedHash, $newHash)) {
|
||||
if (!empty($newHash)) {
|
||||
$this->updatePassword($loginName, $newHash);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ use OC\Authentication\Exceptions\PasswordlessTokenException;
|
|||
use OC\Authentication\Exceptions\PasswordLoginForbiddenException;
|
||||
use OC\Authentication\Token\IProvider;
|
||||
use OC\Authentication\Token\IToken;
|
||||
use OC\Authentication\TwoFactorAuth\Manager as TwoFactorAuthManager;
|
||||
use OC\Hooks\Emitter;
|
||||
use OC\Hooks\PublicEmitter;
|
||||
use OC_User;
|
||||
|
|
@ -524,7 +525,7 @@ class Session implements IUserSession, Emitter {
|
|||
$user = $users[0];
|
||||
}
|
||||
// DI not possible due to cyclic dependencies :'-/
|
||||
return OC::$server->getTwoFactorAuthManager()->isTwoFactorAuthenticated($user);
|
||||
return OC::$server->get(TwoFactorAuthManager::class)->isTwoFactorAuthenticated($user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ use OC\Streamer;
|
|||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\Files\Events\BeforeDirectFileDownloadEvent;
|
||||
use OCP\Files\Events\BeforeZipCreatedEvent;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Lock\ILockingProvider;
|
||||
|
||||
/**
|
||||
|
|
@ -187,7 +188,7 @@ class OC_Files {
|
|||
foreach ($files as $file) {
|
||||
$file = $dir . '/' . $file;
|
||||
if (\OC\Files\Filesystem::is_file($file)) {
|
||||
$userFolder = \OC::$server->getRootFolder()->get(\OC\Files\Filesystem::getRoot());
|
||||
$userFolder = \OC::$server->get(IRootFolder::class)->get(\OC\Files\Filesystem::getRoot());
|
||||
$file = $userFolder->get($file);
|
||||
if ($file instanceof \OC\Files\Node\File) {
|
||||
try {
|
||||
|
|
@ -307,7 +308,7 @@ class OC_Files {
|
|||
$file = null;
|
||||
|
||||
try {
|
||||
$userFolder = \OC::$server->getRootFolder()->get(\OC\Files\Filesystem::getRoot());
|
||||
$userFolder = \OC::$server->get(IRootFolder::class)->get(\OC\Files\Filesystem::getRoot());
|
||||
$file = $userFolder->get($filename);
|
||||
if (!$file instanceof \OC\Files\Node\File || !$file->isReadable()) {
|
||||
http_response_code(403);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*/
|
||||
|
||||
use OC\Authentication\TwoFactorAuth\Manager as TwoFactorAuthManager;
|
||||
|
||||
class OC_JSON {
|
||||
/**
|
||||
* Check if the app is enabled, send json error msg if not
|
||||
|
|
@ -48,7 +51,7 @@ class OC_JSON {
|
|||
* @suppress PhanDeprecatedFunction
|
||||
*/
|
||||
public static function checkLoggedIn() {
|
||||
$twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager();
|
||||
$twoFactorAuthManger = \OC::$server->get(TwoFactorAuthManager::class);
|
||||
if (!\OC::$server->getUserSession()->isLoggedIn()
|
||||
|| $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
|
||||
$l = \OC::$server->getL10N('lib');
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
*/
|
||||
|
||||
use bantu\IniGetWrapper\IniGetWrapper;
|
||||
use OC\Authentication\TwoFactorAuth\Manager as TwoFactorAuthManager;
|
||||
use OC\Files\SetupManager;
|
||||
use OCP\Files\Template\ITemplateManager;
|
||||
use OCP\IConfig;
|
||||
|
|
@ -785,7 +786,7 @@ class OC_Util {
|
|||
exit();
|
||||
}
|
||||
// Redirect to 2FA challenge selection if 2FA challenge was not solved yet
|
||||
if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
|
||||
if (\OC::$server->get(TwoFactorAuthManager::class)->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
|
||||
header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
|
||||
exit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ namespace OCP\Security;
|
|||
*
|
||||
* Usage:
|
||||
* // Hashing a message
|
||||
* $hash = \OC::$server->getHasher()->hash('MessageToHash');
|
||||
* $hash = \OC::$server->get(\OCP\Security\IHasher::class)->hash('MessageToHash');
|
||||
* // Verifying a message - $newHash will contain the newly calculated hash
|
||||
* $newHash = null;
|
||||
* var_dump(\OC::$server->getHasher()->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
|
||||
* var_dump(\OC::$server->get(\OCP\Security\IHasher::class)->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
|
||||
* var_dump($newHash);
|
||||
*
|
||||
* @since 8.0.0
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class PublicKeyTokenProviderTest extends TestCase {
|
|||
parent::setUp();
|
||||
|
||||
$this->mapper = $this->createMock(PublicKeyTokenMapper::class);
|
||||
$this->hasher = \OC::$server->getHasher();
|
||||
$this->hasher = \OC::$server->get(IHasher::class);
|
||||
$this->crypto = \OC::$server->getCrypto();
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->config->method('getSystemValueInt')
|
||||
|
|
|
|||
|
|
@ -1388,7 +1388,7 @@ class ViewTest extends \Test\TestCase {
|
|||
* Test that locks are on mount point paths instead of mount root
|
||||
*/
|
||||
public function testLockLocalMountPointPathInsteadOfStorageRoot() {
|
||||
$lockingProvider = \OC::$server->getLockingProvider();
|
||||
$lockingProvider = \OC::$server->get(ILockingProvider::class);
|
||||
$view = new View('/testuser/files/');
|
||||
$storage = new Temporary([]);
|
||||
Filesystem::mount($storage, [], '/');
|
||||
|
|
@ -1418,7 +1418,7 @@ class ViewTest extends \Test\TestCase {
|
|||
* Test that locks are on mount point paths and also mount root when requested
|
||||
*/
|
||||
public function testLockStorageRootButNotLocalMountPoint() {
|
||||
$lockingProvider = \OC::$server->getLockingProvider();
|
||||
$lockingProvider = \OC::$server->get(ILockingProvider::class);
|
||||
$view = new View('/testuser/files/');
|
||||
$storage = new Temporary([]);
|
||||
Filesystem::mount($storage, [], '/');
|
||||
|
|
@ -1448,7 +1448,7 @@ class ViewTest extends \Test\TestCase {
|
|||
* Test that locks are on mount point paths and also mount root when requested
|
||||
*/
|
||||
public function testLockMountPointPathFailReleasesBoth() {
|
||||
$lockingProvider = \OC::$server->getLockingProvider();
|
||||
$lockingProvider = \OC::$server->get(ILockingProvider::class);
|
||||
$view = new View('/testuser/files/');
|
||||
$storage = new Temporary([]);
|
||||
Filesystem::mount($storage, [], '/');
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class NoFSTest extends \Test\TestCase {
|
|||
$token->setScope([
|
||||
'filesystem' => true
|
||||
]);
|
||||
\OC::$server->getLockdownManager()->setToken($token);
|
||||
\OC::$server->get('LockdownManager')->setToken($token);
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ class NoFSTest extends \Test\TestCase {
|
|||
'filesystem' => false
|
||||
]);
|
||||
|
||||
\OC::$server->getLockdownManager()->setToken($token);
|
||||
\OC::$server->get('LockdownManager')->setToken($token);
|
||||
$this->createUser('foo', 'var');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
|
|||
|
||||
$this->connection = \OC::$server->getDatabaseConnection();
|
||||
$this->previewManager = \OC::$server->getPreviewManager();
|
||||
$this->rootFolder = \OC::$server->getRootFolder();
|
||||
$this->rootFolder = \OC::$server->get(IRootFolder::class);
|
||||
$this->mimeTypeLoader = \OC::$server->getMimeTypeLoader();
|
||||
$this->timeFactory = \OCP\Server::get(ITimeFactory::class);
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
|
|||
|
||||
private function getRoot(): Root {
|
||||
return new Root(
|
||||
\OC::$server->getRootFolder(),
|
||||
\OC::$server->get(IRootFolder::class),
|
||||
\OC::$server->getSystemConfig()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
namespace Test\Preview;
|
||||
|
||||
use OC\Files\Node\File;
|
||||
use OCP\Files\IRootFolder;
|
||||
|
||||
abstract class Provider extends \Test\TestCase {
|
||||
/** @var string */
|
||||
|
|
@ -137,7 +138,7 @@ abstract class Provider extends \Test\TestCase {
|
|||
* @return bool|\OCP\IImage
|
||||
*/
|
||||
private function getPreview($provider) {
|
||||
$file = new File(\OC::$server->getRootFolder(), $this->rootView, $this->imgPath);
|
||||
$file = new File(\OC::$server->get(IRootFolder::class), $this->rootView, $this->imgPath);
|
||||
$preview = $provider->getThumbnail($file, $this->maxWidth, $this->maxHeight, $this->scalingUp);
|
||||
|
||||
if (get_class($this) === BitmapTest::class && $preview === null) {
|
||||
|
|
|
|||
|
|
@ -2514,7 +2514,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
public function testGetSharesInFolder() {
|
||||
$userManager = \OC::$server->getUserManager();
|
||||
$groupManager = \OC::$server->getGroupManager();
|
||||
$rootFolder = \OC::$server->getRootFolder();
|
||||
$rootFolder = \OC::$server->get(IRootFolder::class);
|
||||
|
||||
$provider = new DefaultShareProvider(
|
||||
$this->dbConn,
|
||||
|
|
@ -2612,7 +2612,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
public function testGetAccessListNoCurrentAccessRequired() {
|
||||
$userManager = \OC::$server->getUserManager();
|
||||
$groupManager = \OC::$server->getGroupManager();
|
||||
$rootFolder = \OC::$server->getRootFolder();
|
||||
$rootFolder = \OC::$server->get(IRootFolder::class);
|
||||
|
||||
$provider = new DefaultShareProvider(
|
||||
$this->dbConn,
|
||||
|
|
@ -2708,7 +2708,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
public function testGetAccessListCurrentAccessRequired() {
|
||||
$userManager = \OC::$server->getUserManager();
|
||||
$groupManager = \OC::$server->getGroupManager();
|
||||
$rootFolder = \OC::$server->getRootFolder();
|
||||
$rootFolder = \OC::$server->get(IRootFolder::class);
|
||||
|
||||
$provider = new DefaultShareProvider(
|
||||
$this->dbConn,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ use OCP\Defaults;
|
|||
use OCP\IConfig;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IL10N;
|
||||
use OCP\Lock\ILockingProvider;
|
||||
use OCP\Security\ISecureRandom;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
|
@ -197,7 +198,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
|||
// further cleanup
|
||||
$hookExceptions = \OC_Hook::$thrownExceptions;
|
||||
\OC_Hook::$thrownExceptions = [];
|
||||
\OC::$server->getLockingProvider()->releaseAll();
|
||||
\OC::$server->get(ILockingProvider::class)->releaseAll();
|
||||
if (!empty($hookExceptions)) {
|
||||
throw $hookExceptions[0];
|
||||
}
|
||||
|
|
@ -418,7 +419,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
|
|||
* Clean up the list of locks
|
||||
*/
|
||||
protected static function tearDownAfterClassCleanStrayLocks() {
|
||||
\OC::$server->getLockingProvider()->releaseAll();
|
||||
\OC::$server->get(ILockingProvider::class)->releaseAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue