aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-10 12:40:31 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-10-15 10:40:25 +0200
commit1580c8612b01bfa780d1a7372080a27d182fb7dd (patch)
treeb2776d0cd254ac9d6e54828978ce18b702f550d5 /apps/dashboard/lib
parent4ff9b3e0ce53227e2be47c4c2dcb1fdc3e540b5f (diff)
downloadnextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.tar.gz
nextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.zip
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dashboard/lib')
-rw-r--r--apps/dashboard/lib/Controller/DashboardController.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php
index 69ddceadf17..959129cdfa3 100644
--- a/apps/dashboard/lib/Controller/DashboardController.php
+++ b/apps/dashboard/lib/Controller/DashboardController.php
@@ -10,11 +10,11 @@ namespace OCA\Dashboard\Controller;
use OCA\Dashboard\Service\DashboardService;
use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI;
+use OCP\AppFramework\Http\FeaturePolicy;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Dashboard\IIconWidget;
@@ -24,6 +24,7 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
+use OCP\Util;
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
class DashboardController extends Controller {
@@ -49,8 +50,8 @@ class DashboardController extends Controller {
#[NoAdminRequired]
#[FrontpageRoute(verb: 'GET', url: '/')]
public function index(): TemplateResponse {
- \OCP\Util::addStyle('dashboard', 'dashboard');
- \OCP\Util::addScript('dashboard', 'main', 'theming');
+ Util::addStyle('dashboard', 'dashboard');
+ Util::addScript('dashboard', 'main', 'theming');
$widgets = array_map(function (IWidget $widget) {
return [
@@ -76,7 +77,7 @@ class DashboardController extends Controller {
]);
// For the weather widget we should allow the geolocation
- $featurePolicy = new Http\FeaturePolicy();
+ $featurePolicy = new FeaturePolicy();
$featurePolicy->addAllowedGeoLocationDomain('\'self\'');
$response->setFeaturePolicy($featurePolicy);