aboutsummaryrefslogtreecommitdiffstats
path: root/mod/redir.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-02 00:31:11 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-02 00:31:11 -0700
commitb49858b038a0a05bbe7685929e88071d0e125538 (patch)
treee08bf4750f45a2729978cafb8949642659d7277c /mod/redir.php
parent19a28434c46864f525f106bbe1ace933584290fb (diff)
downloadvolse-hubzilla-b49858b038a0a05bbe7685929e88071d0e125538.tar.gz
volse-hubzilla-b49858b038a0a05bbe7685929e88071d0e125538.tar.bz2
volse-hubzilla-b49858b038a0a05bbe7685929e88071d0e125538.zip
start on 2way comms, 2.0 dev
Diffstat (limited to 'mod/redir.php')
-rw-r--r--mod/redir.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/redir.php b/mod/redir.php
index ea1aec6e9..88b291146 100644
--- a/mod/redir.php
+++ b/mod/redir.php
@@ -4,17 +4,20 @@ function redir_init(&$a) {
if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1])))
goaway($a->get_baseurl());
- $r = q("SELECT `issued-id`, `poll` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `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))
goaway($a->get_baseurl());
+
+ $dfrn_id = (($r[0]['duplex']) ? $r[0]['dfrn-id'] : $r[0]['issued-id']);
+
q("INSERT INTO `profile_check` ( `uid`, `dfrn_id`, `expire`)
VALUES( %d, '%s', %d )",
intval($_SESSION['uid']),
- dbesc($r[0]['issued-id']),
+ dbesc($dfrn_id),
intval(time() + 45));
- goaway ($r[0]['poll'] . '?dfrn_id=' . $r[0]['issued-id'] . '&type=profile');
+ goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id . '&type=profile');