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