Move mod/nogroup to src/Module/Group
This commit is contained in:
parent
900fe158f5
commit
1ef4b9c7e4
|
@ -1,23 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* @file mod/nogroup.php
|
|
||||||
*/
|
|
||||||
use Friendica\App;
|
|
||||||
use Friendica\Core\L10n;
|
|
||||||
|
|
||||||
function nogroup_init(App $a)
|
|
||||||
{
|
|
||||||
if (! local_user()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function nogroup_content(App $a)
|
|
||||||
{
|
|
||||||
if (! local_user()) {
|
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$a->internalRedirect('group/none');
|
|
||||||
}
|
|
|
@ -129,6 +129,7 @@ class Router
|
||||||
$this->routeCollector->addRoute(['GET'], '/magic', Module\Magic::class);
|
$this->routeCollector->addRoute(['GET'], '/magic', Module\Magic::class);
|
||||||
$this->routeCollector->addRoute(['GET'], '/manifest', Module\Manifest::class);
|
$this->routeCollector->addRoute(['GET'], '/manifest', Module\Manifest::class);
|
||||||
$this->routeCollector->addRoute(['GET'], '/nodeinfo/1.0', Module\NodeInfo::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->addRoute(['GET'], '/objects/{guid}', Module\Objects::class);
|
||||||
$this->routeCollector->addGroup('/oembed', function (RouteCollector $collector) {
|
$this->routeCollector->addGroup('/oembed', function (RouteCollector $collector) {
|
||||||
$collector->addRoute(['GET'], '/[b2h|h2b]', Module\Oembed::class);
|
$collector->addRoute(['GET'], '/[b2h|h2b]', Module\Oembed::class);
|
||||||
|
|
|
@ -176,7 +176,9 @@ class Group extends BaseModule
|
||||||
|
|
||||||
$nogroup = false;
|
$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;
|
$id = -1;
|
||||||
$nogroup = true;
|
$nogroup = true;
|
||||||
$group = [
|
$group = [
|
||||||
|
|
Loading…
Reference in a new issue