]> git.mxchange.org Git - friendica.git/commitdiff
Remove src/Module/Notice
authorPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 16:22:34 +0000 (18:22 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 16:22:34 +0000 (18:22 +0200)
see https://github.com/friendica/friendica/pull/7159#issuecomment-493744623

src/App/Router.php
src/Module/GnuSocial/Notice.php [deleted file]

index 373bb1c32e81a3059b15868aca61db72cb352e65..29d10bf4fc05cd1fb07d32adc9edf2d2ffc28213 100644 (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);
diff --git a/src/Module/GnuSocial/Notice.php b/src/Module/GnuSocial/Notice.php
deleted file mode 100644 (file)
index 88598ff..0000000
+++ /dev/null
@@ -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']);
-               }
-       }
-}