diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-07-01 15:12:15 +0200 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-07-01 15:12:15 +0200 |
commit | 2c7186a15f81d084617b43e5cfbf9c6c34189667 (patch) | |
tree | 10545e5ca7e5cf6e561a2e575052466850a324b7 /lib | |
parent | 0df68f069705f150892ea5538a23e8e1f64460cc (diff) | |
download | nextcloud-server-2c7186a15f81d084617b43e5cfbf9c6c34189667.tar.gz nextcloud-server-2c7186a15f81d084617b43e5cfbf9c6c34189667.zip |
Remove \OC::$server->getURLGenerator() usage
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Util.php | 3 | ||||
-rw-r--r-- | lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 0da7f01b676..e62dd2d0c2e 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -70,6 +70,7 @@ use OCP\Files\Template\ITemplateManager; use OCP\IConfig; use OCP\IGroupManager; use OCP\ILogger; +use OCP\IURLGenerator; use OCP\IUser; use OCP\Share\IManager; use Psr\Log\LoggerInterface; @@ -1088,7 +1089,7 @@ class OC_Util { * @suppress PhanDeprecatedFunction */ public static function getDefaultPageUrl() { - $urlGenerator = \OC::$server->getURLGenerator(); + $urlGenerator = \OC::$server->get(IURLGenerator::class); return $urlGenerator->linkToDefaultPageUrl(); } diff --git a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php index 32604e9e14c..763a7717f2a 100644 --- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php +++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php @@ -26,6 +26,8 @@ declare(strict_types=1); */ namespace OCP\AppFramework\Http; +use OCP\IURLGenerator; + /** * Redirects to the default app * @since 16.0.0 @@ -38,7 +40,8 @@ class RedirectToDefaultAppResponse extends RedirectResponse { * @since 16.0.0 */ public function __construct() { - $urlGenerator = \OC::$server->getURLGenerator(); + /** @var IURLGenerator $urlGenerator */ + $urlGenerator = \OC::$server->get(IURLGenerator::class); parent::__construct($urlGenerator->linkToDefaultPageUrl()); } } |