Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use OCP\Server
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Feb 12, 2024
commit e9d97a568fd00251dcc3d68042140948fa0dc6da
4 changes: 2 additions & 2 deletions apps/files_external/tests/Service/StoragesServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
use OCP\Files\Storage\IStorage;
use OCP\IDBConnection;
use OCP\IUser;
use OCP\Server;

class CleaningDBConfig extends DBConfigService {
private $mountIds = [];
Expand All @@ -67,7 +68,6 @@ public function clean() {
* @group DB
*/
abstract class StoragesServiceTest extends \Test\TestCase {

/**
* @var StoragesService
*/
Expand Down Expand Up @@ -316,7 +316,7 @@ public function testDeleteStorage($backendOptions, $rustyStorageId) {

// manually trigger storage entry because normally it happens on first
// access, which isn't possible within this test
$storageCache = new \OC\Files\Cache\Storage($rustyStorageId, true, \OC::$server->get(IDBConnection::class));
$storageCache = new \OC\Files\Cache\Storage($rustyStorageId, true, Server::get(IDBConnection::class));

/** @var IUserMountCache $mountCache */
$mountCache = \OC::$server->get(IUserMountCache::class);
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Files/Cache/Wrapper/CacheWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchQuery;
use OCP\Server;

class CacheWrapper extends Cache {
/**
Expand All @@ -50,7 +51,7 @@ public function __construct(?ICache $cache, CacheDependencies $dependencies = nu
$this->querySearchHelper = $cache->querySearchHelper;
} else {
if (!$dependencies) {
$dependencies = \OC::$server->get(CacheDependencies::class);
$dependencies = Server::get(CacheDependencies::class);
}
$this->mimetypeLoader = $dependencies->getMimeTypeLoader();
$this->connection = $dependencies->getConnection();
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
use OCP\Files\Storage\IWriteStreamStorage;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use OCP\Server;
use Psr\Log\LoggerInterface;

/**
Expand Down Expand Up @@ -342,7 +343,7 @@ public function hasUpdated($path, $time) {
protected function getCacheDependencies(): CacheDependencies {
static $dependencies = null;
if (!$dependencies) {
$dependencies = \OC::$server->get(CacheDependencies::class);
$dependencies = Server::get(CacheDependencies::class);
}
return $dependencies;
}
Expand Down