3 namespace Friendica\Module\GnuSocial;
5 use Friendica\BaseModule;
6 use Friendica\Core\L10n;
7 use Friendica\Database\DBA;
8 use Friendica\Model\Item;
9 use Friendica\Model\ItemUser;
10 use Friendica\Network\HTTPException;
13 * GNU Social -> friendica items permanent-url compatibility
15 class Notice extends BaseModule
17 public static function content()
21 // @TODO: Replace with parameter from router
22 $id = ($a->argc > 1) ? $a->argv[1] : 0;
25 throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
28 $item = DBA::selectFirst('item', ['guid'], ['id' => $id]);
31 throw new HTTPException\NotFoundException(L10n::t('Item not found.'));
33 $a->internalRedirect('display/' . $item['guid']);