aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_confirm.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-16 19:38:07 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-16 19:38:07 -0700
commitce515ac2e815cf6c392691743393ea6ebc42c832 (patch)
tree7c22e8e4e243b574e43faedbf6351f9fc1a8e6ca /mod/dfrn_confirm.php
parent30e3a65c0f15f2cbcc538b35c18b1f60490fda9b (diff)
downloadvolse-hubzilla-ce515ac2e815cf6c392691743393ea6ebc42c832.tar.gz
volse-hubzilla-ce515ac2e815cf6c392691743393ea6ebc42c832.tar.bz2
volse-hubzilla-ce515ac2e815cf6c392691743393ea6ebc42c832.zip
prepare for federation
Diffstat (limited to 'mod/dfrn_confirm.php')
-rw-r--r--mod/dfrn_confirm.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 359ddef17..98c1488f8 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -44,6 +44,8 @@ function dfrn_confirm_post(&$a) {
xml_status(3);
}
+ $relation = $r[0]['rel'];
+
// Decrypt all this stuff we just received
$foreign_pubkey = $ret[0]['site-pubkey'];
@@ -116,9 +118,10 @@ function dfrn_confirm_post(&$a) {
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
}
- $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `rel` = %d, `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 `network` = 'dfrn' WHERE `id` = %d LIMIT 1",
dbesc($photo),
dbesc($thumb),
+ intval(($relation == DIRECTION_IN) ? DIRECTION_BOTH: DIRECTION_OUT),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
@@ -189,6 +192,7 @@ function dfrn_confirm_post(&$a) {
}
$contact_id = $r[0]['id'];
+ $relation = $r[0]['rel'];
$site_pubkey = $r[0]['site-pubkey'];
$dfrn_confirm = $r[0]['confirm'];
$aes_allow = $r[0]['aes_allow'];
@@ -325,9 +329,10 @@ function dfrn_confirm_post(&$a) {
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
}
- $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `rel` = %d, `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 `network` = 'dfrn' WHERE `id` = %d LIMIT 1",
dbesc($photo),
dbesc($thumb),
+ intval(($relation == DIRECTION_OUT) ? DIRECTION_BOTH: DIRECTION_IN),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),