X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fnotice.php;h=b40f0ee69cf5bfd9fef800f27c19181b1a5f011f;hb=52eb2281e41b8493438d21b770572cdc9af8fcb2;hp=03f0e24037e6e75fb83ce09eec453722afbc5ee5;hpb=56ee734b00aead633d5d213a6b140b75bc17ba96;p=friendica.git diff --git a/mod/notice.php b/mod/notice.php index 03f0e24037..b40f0ee69c 100644 --- a/mod/notice.php +++ b/mod/notice.php @@ -1,19 +1,24 @@ friendica items permanent-url compatibility + */ -/* identi.ca -> friendica items permanent-url compatibility */ - - -function notice_init(App $a) { +use Friendica\App; +use Friendica\Core\L10n; +use Friendica\Core\System; +use Friendica\Database\DBA; +function notice_init(App $a) +{ $id = $a->argv[1]; $r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id)); - if (dbm::is_result($r)) { + if (DBA::isResult($r)) { $nick = $r[0]['nickname']; - $url = App::get_baseurl() . "/display/$nick/$id"; - goaway($url); + $a->internalRedirect('display/' . $nick . '/' . $id); } else { $a->error = 404; - notice(t('Item not found.') . EOL); + notice(L10n::t('Item not found.') . EOL); } return;