From c6ea22428973a5b2d2643e5207cf368b43fd486d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 20 Dec 2024 17:31:34 -0800 Subject: [PATCH] Remove dir since it is not implemented fix test --- config/services.yml | 1 - controller/manifest.php | 9 +-------- tests/functional/functional_test.php | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/config/services.yml b/config/services.yml index 07cd894..5a3eb10 100644 --- a/config/services.yml +++ b/config/services.yml @@ -62,6 +62,5 @@ services: class: phpbb\webpushnotifications\controller\manifest arguments: - '@config' - - '@language' - '@path_helper' - '@user' diff --git a/controller/manifest.php b/controller/manifest.php index d1ebff7..939322b 100644 --- a/controller/manifest.php +++ b/controller/manifest.php @@ -12,7 +12,6 @@ use phpbb\config\config; use phpbb\exception\http_exception; -use phpbb\language\language; use phpbb\path_helper; use phpbb\user; use phpbb\webpushnotifications\ext; @@ -24,9 +23,6 @@ class manifest /** @var config */ protected $config; - /** @var language */ - protected $language; - /** @var path_helper */ protected $path_helper; @@ -38,14 +34,12 @@ class manifest * * @param config $config * @param path_helper $path_helper - * @param language $language * @param user $user */ - public function __construct(config $config, language $language, path_helper $path_helper, user $user) + public function __construct(config $config, path_helper $path_helper, user $user) { $this->config = $config; $this->path_helper = $path_helper; - $this->language = $language; $this->user = $user; } @@ -73,7 +67,6 @@ public function handle(): JsonResponse 'short_name' => $pwa_short_name ?: utf8_substr($sitename, 0, 12), 'display' => 'standalone', 'orientation' => 'portrait', - 'dir' => $this->language->lang('DIRECTION'), 'start_url' => $board_path, 'scope' => $board_path, ]; diff --git a/tests/functional/functional_test.php b/tests/functional/functional_test.php index ac7adf9..6527126 100644 --- a/tests/functional/functional_test.php +++ b/tests/functional/functional_test.php @@ -120,7 +120,6 @@ public function test_manifest() 'short_name' => 'yourdomain', 'display' => 'standalone', 'orientation' => 'portrait', - 'dir' => 'ltr', 'start_url' => '/', 'scope' => '/', ];