diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-11-08 00:18:37 -0800 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-11-08 00:18:37 -0800 |
commit | eeec29c6be2429ea38ab258591200e0178886a25 (patch) | |
tree | 09f54a745f7ec828914e3ba7ee90492b0804ffef /mod/notice.php | |
parent | 9fabdbf2c974211c8fef18e48a956f8f38bd9e74 (diff) | |
parent | c90e6c6e0782e3e8ac9cf1be3acbc13f5448148d (diff) | |
download | volse-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.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; + + } |