From 853f5cb92fb0f579322c2f8b0c92544df4b11c05 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Mon, 20 May 2019 18:22:34 +0200 Subject: [PATCH] Remove src/Module/Notice see https://github.com/friendica/friendica/pull/7159#issuecomment-493744623 --- src/App/Router.php | 1 - src/Module/GnuSocial/Notice.php | 34 --------------------------------- 2 files changed, 35 deletions(-) delete mode 100644 src/Module/GnuSocial/Notice.php diff --git a/src/App/Router.php b/src/App/Router.php index 373bb1c32..29d10bf4f 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -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); diff --git a/src/Module/GnuSocial/Notice.php b/src/Module/GnuSocial/Notice.php deleted file mode 100644 index 88598ff2a..000000000 --- a/src/Module/GnuSocial/Notice.php +++ /dev/null @@ -1,34 +0,0 @@ - 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']); - } - } -}