aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notice.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-11-07 17:41:23 +0100
committerFabio Comuni <fabrix.xm@gmail.com>2011-11-07 17:41:23 +0100
commit00c342e13d833fd215e5dc03a508e1abe660fe21 (patch)
treed276554274475d8a0e2d8e1e9ae34035dd64085a /mod/notice.php
parent355026ab7a53838c8e7a7b5717626ee057e5cd4c (diff)
parentb070666120fc6cbc0d90a0ad160274f8ecf7a027 (diff)
downloadvolse-hubzilla-00c342e13d833fd215e5dc03a508e1abe660fe21.tar.gz
volse-hubzilla-00c342e13d833fd215e5dc03a508e1abe660fe21.tar.bz2
volse-hubzilla-00c342e13d833fd215e5dc03a508e1abe660fe21.zip
Merge branch 'oauthapi'
Diffstat (limited to 'mod/notice.php')
-rw-r--r--mod/notice.php20
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;
+
+ }