aboutsummaryrefslogtreecommitdiffstats
path: root/mod/redir.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-18 00:43:49 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-18 00:43:49 -0700
commit511c761fec572a093e833541968635ca011cb71e (patch)
tree3db5bbc37e47d7bfb7da1086483fff28ca66e147 /mod/redir.php
parentbe981a4f8a00fa7fb3e5bf9ac47aa38fd5187a35 (diff)
downloadvolse-hubzilla-511c761fec572a093e833541968635ca011cb71e.tar.gz
volse-hubzilla-511c761fec572a093e833541968635ca011cb71e.tar.bz2
volse-hubzilla-511c761fec572a093e833541968635ca011cb71e.zip
group/community/celebrity pages
Diffstat (limited to 'mod/redir.php')
-rw-r--r--mod/redir.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/mod/redir.php b/mod/redir.php
index c9b284ddd..e743d003e 100644
--- a/mod/redir.php
+++ b/mod/redir.php
@@ -4,14 +4,15 @@ function redir_init(&$a) {
if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1])))
goaway($a->get_baseurl());
- $r = q("SELECT `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `network`, `issued-id`, `dfrn-id`, `duplex`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[1]),
- intval($_SESSION['uid']));
- if(! count($r))
+ intval(get_uid())
+ );
+ if((! count($r)) || ($r[0]['network'] !== 'dfrn'))
goaway($a->get_baseurl());
+ $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']);
- $dfrn_id = $orig_id = $r[0]['issued-id'];
if($r[0]['duplex'] && $r[0]['issued-id']) {
$orig_id = $r[0]['issued-id'];
$dfrn_id = '1:' . $orig_id;