aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notice.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-11-08 00:18:37 -0800
committerfabrixxm <fabrix.xm@gmail.com>2011-11-08 00:18:37 -0800
commiteeec29c6be2429ea38ab258591200e0178886a25 (patch)
tree09f54a745f7ec828914e3ba7ee90492b0804ffef /mod/notice.php
parent9fabdbf2c974211c8fef18e48a956f8f38bd9e74 (diff)
parentc90e6c6e0782e3e8ac9cf1be3acbc13f5448148d (diff)
downloadvolse-hubzilla-eeec29c6be2429ea38ab258591200e0178886a25.tar.gz
volse-hubzilla-eeec29c6be2429ea38ab258591200e0178886a25.tar.bz2
volse-hubzilla-eeec29c6be2429ea38ab258591200e0178886a25.zip
Merge pull request #2 from fabrixxm/master
Oauth1 support in API
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;
+
+ }