From 7dfe517c77c3f2499b7340ace74cb623c6263824 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 12 Dec 2022 11:24:20 +0000 Subject: [PATCH] Redirect in a different way --- src/App.php | 4 ---- src/Module/About.php | 35 +++++++++++++++++++++++++++++++++++ static/routes.config.php | 2 ++ 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 src/Module/About.php diff --git a/src/App.php b/src/App.php index d4120bcc2d..0d4e8880dd 100644 --- a/src/App.php +++ b/src/App.php @@ -717,10 +717,6 @@ class App $this->baseURL->redirect('search'); } - if (in_array($moduleName, ['about', 'about/more'])) { - $this->baseURL->redirect('friendica'); - } - // Initialize module that can set the current theme in the init() method, either directly or via App->setProfileOwner $page['page_title'] = $moduleName; diff --git a/src/Module/About.php b/src/Module/About.php new file mode 100644 index 0000000000..dd58450fb3 --- /dev/null +++ b/src/Module/About.php @@ -0,0 +1,35 @@ +. + * + */ + +namespace Friendica\Module; + +use Friendica\BaseModule; + +/** + * Redirect to the friendica page + */ +class About extends BaseModule +{ + protected function rawContent(array $request = []) + { + $this->baseUrl->redirect('friendica'); + } +} diff --git a/static/routes.config.php b/static/routes.config.php index f33cd9581a..70d230c2a2 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -318,6 +318,8 @@ return [ '/proofs' => [Module\Api\Mastodon\Proofs::class, [R::GET ]], // Dummy, not supported ], + '/about[/more]' => [Module\About::class, [R::GET]], + '/admin' => [ '[/]' => [Module\Admin\Summary::class, [R::GET]], -- 2.39.5