From 295d90d496a56217383481fa7a0153e0ac48e38a Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 18 May 2019 21:13:19 +0200 Subject: [PATCH] Move mod/toggle_mobile to src/Module/ToggleMobile --- mod/toggle_mobile.php | 20 -------------------- src/App/Router.php | 1 + src/Module/ToggleMobile.php | 30 ++++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 20 deletions(-) delete mode 100644 mod/toggle_mobile.php create mode 100644 src/Module/ToggleMobile.php diff --git a/mod/toggle_mobile.php b/mod/toggle_mobile.php deleted file mode 100644 index d1a26b3ca2..0000000000 --- a/mod/toggle_mobile.php +++ /dev/null @@ -1,20 +0,0 @@ -redirect($address); -} diff --git a/src/App/Router.php b/src/App/Router.php index cd59c3dd90..d35b86fd74 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -201,6 +201,7 @@ class Router $this->routeCollector->addRoute(['GET'], '/rsd.xml', Module\ReallySimpleDiscovery::class); $this->routeCollector->addRoute(['GET'], '/smilies[/json]', Module\Smilies::class); $this->routeCollector->addRoute(['GET'], '/statistics.json', Module\Statistics::class); + $this->routeCollector->addRoute(['GET'], '/toggle_mobile', Module\ToggleMobile::class); $this->routeCollector->addRoute(['GET'], '/tos', Module\Tos::class); $this->routeCollector->addRoute(['GET'], '/viewsrc/{item:\d+}', Module\ItemBody::class); $this->routeCollector->addRoute(['GET'], '/webfinger', Module\WebFinger::class); diff --git a/src/Module/ToggleMobile.php b/src/Module/ToggleMobile.php new file mode 100644 index 0000000000..9788c0b5db --- /dev/null +++ b/src/Module/ToggleMobile.php @@ -0,0 +1,30 @@ +redirect($address); + } +}