summaryrefslogtreecommitdiffstats
path: root/apps/files/list.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-04-08 14:16:21 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-05-10 18:51:12 +0200
commitf945c0cbc6aef461fabf17cea42440ad9b6fea09 (patch)
tree73bb7d91d3721049f436ecf160f66c640a805a02 /apps/files/list.php
parent0690646d09430ce363b07bc2cd59283e303314eb (diff)
downloadnextcloud-server-f945c0cbc6aef461fabf17cea42440ad9b6fea09.tar.gz
nextcloud-server-f945c0cbc6aef461fabf17cea42440ad9b6fea09.zip
Add a public replacement for OC::$server->get
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files/list.php')
-rw-r--r--apps/files/list.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/list.php b/apps/files/list.php
index 09dc217139c..c4b93b2e145 100644
--- a/apps/files/list.php
+++ b/apps/files/list.php
@@ -23,12 +23,15 @@
*
*/
use OCP\Share\IManager;
+use OCP\Server;
+use OCP\IConfig;
+use OCP\IUserSession;
-$config = \OC::$server->getConfig();
-$userSession = \OC::$server->getUserSession();
+$config = Server::get(IConfig::class);
+$userSession = Server::get(IUserSession::class);
// TODO: move this to the generated config.js
/** @var IManager $shareManager */
-$shareManager = \OC::$server->get(IManager::class);
+$shareManager = Server::get(IManager::class);
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';
$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false);