From: Philipp Holzer Date: Fri, 3 May 2019 06:50:17 +0000 (+0200) Subject: Move mod/nogroup to src/Module/Group X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ef4b9c7e4a8ef75fba1e5a77e5a591b7c9af06d;p=friendica.git Move mod/nogroup to src/Module/Group --- diff --git a/mod/nogroup.php b/mod/nogroup.php deleted file mode 100644 index 20dbd23a3e..0000000000 --- a/mod/nogroup.php +++ /dev/null @@ -1,23 +0,0 @@ -internalRedirect('group/none'); -} diff --git a/src/App/Router.php b/src/App/Router.php index 34ca0df3dd..6612936e1b 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -129,6 +129,7 @@ class Router $this->routeCollector->addRoute(['GET'], '/magic', Module\Magic::class); $this->routeCollector->addRoute(['GET'], '/manifest', Module\Manifest::class); $this->routeCollector->addRoute(['GET'], '/nodeinfo/1.0', Module\NodeInfo::class); + $this->routeCollector->addRoute(['GET'], '/nogroup', Module\Group::class); $this->routeCollector->addRoute(['GET'], '/objects/{guid}', Module\Objects::class); $this->routeCollector->addGroup('/oembed', function (RouteCollector $collector) { $collector->addRoute(['GET'], '/[b2h|h2b]', Module\Oembed::class); diff --git a/src/Module/Group.php b/src/Module/Group.php index acc969c7e0..d8d5fb1c59 100644 --- a/src/Module/Group.php +++ b/src/Module/Group.php @@ -176,7 +176,9 @@ class Group extends BaseModule $nogroup = false; - if (($a->argc == 2) && ($a->argv[1] === 'none')) { + // @TODO: Replace with parameter from router + if (($a->argc == 2) && ($a->argv[1] === 'none') || + ($a->argc == 1) && ($a->argv[0] === 'nogroup')) { $id = -1; $nogroup = true; $group = [