aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2012-06-11 20:47:11 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2012-06-11 20:47:11 +0530
commit11974b4d948ae5d9b9fb53970838463bd88bb9f6 (patch)
tree426724e218a2fcaf3a1a2eedf6ffa591299755ee /include/follow.php
parent079fdecff1f4daa534045f4bd857e6ae6324474d (diff)
parentafa88154114d5632cb13e7c3f56143cccdfd7daa (diff)
downloadvolse-hubzilla-11974b4d948ae5d9b9fb53970838463bd88bb9f6.tar.gz
volse-hubzilla-11974b4d948ae5d9b9fb53970838463bd88bb9f6.tar.bz2
volse-hubzilla-11974b4d948ae5d9b9fb53970838463bd88bb9f6.zip
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/follow.php b/include/follow.php
index d92d7577d..22288a0da 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -94,6 +94,9 @@ function new_contact($uid,$url,$interactive = false) {
}
$writeable = ((($ret['network'] === NETWORK_OSTATUS) && ($ret['notify'])) ? 1 : 0);
+
+ $subhub = (($ret['network'] === NETWORK_OSTATUS) ? true : false);
+
$hidden = (($ret['network'] === NETWORK_MAIL) ? 1 : 0);
if($ret['network'] === NETWORK_MAIL) {
@@ -116,8 +119,9 @@ function new_contact($uid,$url,$interactive = false) {
if(count($r)) {
// update contact
if($r[0]['rel'] == CONTACT_IS_FOLLOWER || ($network === NETWORK_DIASPORA && $r[0]['rel'] == CONTACT_IS_SHARING)) {
- q("UPDATE `contact` SET `rel` = %d , `readonly` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ q("UPDATE `contact` SET `rel` = %d , `subhub` = %d, `readonly` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval(CONTACT_IS_FRIEND),
+ intval($subhub),
intval($r[0]['id']),
intval($uid)
);
@@ -131,8 +135,8 @@ function new_contact($uid,$url,$interactive = false) {
// create contact record
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `batch`, `notify`, `poll`, `poco`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`,
- `writable`, `hidden`, `blocked`, `readonly`, `pending` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, 0, 0, 0 ) ",
+ `writable`, `hidden`, `blocked`, `readonly`, `pending`, `subhub` )
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, 0, 0, 0, %d ) ",
intval($uid),
dbesc(datetime_convert()),
dbesc($ret['url']),
@@ -151,7 +155,8 @@ function new_contact($uid,$url,$interactive = false) {
intval($new_relation),
intval($ret['priority']),
intval($writeable),
- intval($hidden)
+ intval($hidden),
+ intval($subhub)
);
}