From 3f71a51d210683a0f591d2a507bdfb95064536d3 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 5 May 2019 19:23:03 +0200 Subject: [PATCH] Move mod/pretheme to src/Module/ThemeDetails --- mod/pretheme.php | 25 ------------------------- src/App/Router.php | 1 + src/Module/ThemeDetails.php | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 25 deletions(-) delete mode 100644 mod/pretheme.php create mode 100644 src/Module/ThemeDetails.php diff --git a/mod/pretheme.php b/mod/pretheme.php deleted file mode 100644 index 14d1f2b9ea..0000000000 --- a/mod/pretheme.php +++ /dev/null @@ -1,25 +0,0 @@ - Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]); - } - - exit(); -} diff --git a/src/App/Router.php b/src/App/Router.php index 1dffb6b406..40f2d5ebcc 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -153,6 +153,7 @@ class Router $collector->addRoute(['GET'], '/{type}/{name}', Module\Photo::class); $collector->addRoute(['GET'], '/{type}/{customize}/{name}', Module\Photo::class); }); + $this->routeCollector->addRoute(['GET'], '/pretheme', Module\ThemeDetails::class); $this->routeCollector->addGroup('/profile', function (RouteCollector $collector) { $collector->addRoute(['GET'], '/{nickname}', Module\Profile::class); $collector->addRoute(['GET'], '/{profile:\d+}/view', Module\Profile::class); diff --git a/src/Module/ThemeDetails.php b/src/Module/ThemeDetails.php new file mode 100644 index 0000000000..7b53d1cfde --- /dev/null +++ b/src/Module/ThemeDetails.php @@ -0,0 +1,33 @@ + Theme::getScreenshot($theme), + 'desc' => $description, + 'version' => $version, + 'credits' => $credits, + ]); + } + exit(); + } +} -- 2.39.5