diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-11-07 17:39:00 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-11-07 17:39:00 +0100 |
commit | b070666120fc6cbc0d90a0ad160274f8ecf7a027 (patch) | |
tree | 10b438d3cb52dbe7046f0f51823dd4af49cb8eb0 | |
parent | 4407fc2c5d47ee1a7dfb8bfdfd47e73b22ec7e2a (diff) | |
download | volse-hubzilla-b070666120fc6cbc0d90a0ad160274f8ecf7a027.tar.gz volse-hubzilla-b070666120fc6cbc0d90a0ad160274f8ecf7a027.tar.bz2 volse-hubzilla-b070666120fc6cbc0d90a0ad160274f8ecf7a027.zip |
statusnet-friendika post permalink compatibility
-rw-r--r-- | mod/notice.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/notice.php b/mod/notice.php new file mode 100644 index 000000000..9d8aeed70 --- /dev/null +++ b/mod/notice.php @@ -0,0 +1,20 @@ +<?php + /* identi.ca -> friendika items permanent-url compatibility */ + + function notice_init(&$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 (count($r)){ + $nick = $r[0]['nickname']; + $url = $a->get_baseurl()."/display/$nick/$id"; + goaway($url); + } else { + $a->error = 404; + notice( t('Item not found.') . EOL); + + } + return; + + } |