3 /* GNU Social -> friendica items permanent-url compatibility */
6 use Friendica\Core\System;
7 use Friendica\Database\DBM;
9 function notice_init(App $a) {
12 $r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id));
13 if (DBM::is_result($r)) {
14 $nick = $r[0]['nickname'];
15 $url = System::baseUrl() . "/display/$nick/$id";
19 notice(t('Item not found.') . EOL);