Remove src/Module/Notice

see https://github.com/friendica/friendica/pull/7159#issuecomment-493744623
This commit is contained in:
Philipp Holzer 2019-05-20 18:22:34 +02:00
parent 7a13582c67
commit 853f5cb92f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
2 changed files with 0 additions and 35 deletions

View file

@ -169,7 +169,6 @@ class Router
$collector->addRoute(['GET'], '/view/{id:\d+}', Module\Notifications\Notify::class);
$collector->addRoute(['GET'], '/mark/all', Module\Notifications\Notify::class);
});
$this->routeCollector->addRoute(['GET'], '/notice/{id:\d+}', Module\GnuSocial\Notice::class);
$this->routeCollector->addRoute(['GET'], '/objects/{guid}', Module\Objects::class);
$this->routeCollector->addGroup('/oembed', function (RouteCollector $collector) {
$collector->addRoute(['GET'], '/b2h', Module\Oembed::class);

View file

@ -1,34 +0,0 @@
<?php
namespace Friendica\Module\GnuSocial;
use Friendica\BaseModule;
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Network\HTTPException;
/**
* GNU Social -> friendica items permanent-url compatibility
*/
class Notice extends BaseModule
{
public static function content()
{
$a = self::getApp();
// @TODO: Replace with parameter from router
$id = ($a->argc > 1) ? $a->argv[1] : 0;
if (empty($id)) {
throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
}
$item = DBA::selectFirst('item', ['guid'], ['id' => $id]);
if (empty($item )) {
throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
} else {
$a->internalRedirect('display/' . $item['guid']);
}
}
}