diff options
author | Thomas Willingham <founder@kakste.com> | 2013-08-24 17:05:18 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-08-24 17:05:18 +0100 |
commit | c803fb90df3bbbd8bb88df09a271b5a9214e8c1d (patch) | |
tree | 0ad021580411798fc0ab025f1b1c302fe8afd3f6 /include/Contact.php | |
parent | 6999fb586ba90e9f1c79e9f09f4035f63fb925fd (diff) | |
parent | b0dd38b30949f907265eda757bfa14aa1f38b38f (diff) | |
download | volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.gz volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.bz2 volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/Contact.php b/include/Contact.php index 992ed27e2..46d356f3f 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -15,13 +15,20 @@ function rconnect_url($channel_id,$xchan) { if($r) return ''; + $r = q("select * from xchan where xchan_hash = '%s' limit 1", + dbesc($xchan) + ); + + if(($r) && ($r[0]['xchan_follow'])) + return $r[0]['xchan_follow']; + $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and ( hubloc_flags & %d ) limit 1", dbesc($xchan), intval(HUBLOC_FLAGS_PRIMARY) ); if($r) - return $r[0]['hubloc_url']; + return $r[0]['hubloc_url'] . '/follow?f=&url=%s'; return ''; } @@ -295,8 +302,8 @@ function contact_remove($channel_id, $abook_id) { $archive = get_pconfig($channel_id, 'system','archive_removed_contacts'); if($archive) { - q("update abook set abook_flags = abook_flags | %d where abook_id = %d and abook_channel = %d limit 1", - intval(ABOOK_FLAG_ARCHIVE), + q("update abook set abook_flags = ( abook_flags | %d ) where abook_id = %d and abook_channel = %d limit 1", + intval(ABOOK_FLAG_ARCHIVED), intval($abook_id), intval($channel_id) ); |