aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-18 04:49:15 -0700
committerfriendica <info@friendica.com>2012-07-18 04:49:15 -0700
commitd683df17bd530739bc64c79f152957ab229b6a02 (patch)
tree80d8a9e92d764aeacbb7bc09551ca1e501456ace /include/follow.php
parent22cf19e174bcee88b44968f2773d1bad2da2b54d (diff)
downloadvolse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.tar.gz
volse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.tar.bz2
volse-hubzilla-d683df17bd530739bc64c79f152957ab229b6a02.zip
Removing connectors we won't be needing - this is probably going to break some shit.
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php56
1 files changed, 1 insertions, 55 deletions
diff --git a/include/follow.php b/include/follow.php
index b4d1732b8..35dbb0236 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -62,16 +62,6 @@ function new_contact($uid,$url,$interactive = false) {
}
}
-
-
-
-
-
- // This extra param just confuses things, remove it
- if($ret['network'] === NETWORK_DIASPORA)
- $ret['url'] = str_replace('?absolute=true','',$ret['url']);
-
-
// do we have enough information?
if(! ((x($ret,'name')) && (x($ret,'poll')) && ((x($ret,'url')) || (x($ret,'addr'))))) {
@@ -107,14 +97,7 @@ function new_contact($uid,$url,$interactive = false) {
$subhub = (($ret['network'] === NETWORK_OSTATUS) ? true : false);
- $hidden = (($ret['network'] === NETWORK_MAIL) ? 1 : 0);
-
- if($ret['network'] === NETWORK_MAIL) {
- $writeable = 1;
-
- }
- if($ret['network'] === NETWORK_DIASPORA)
- $writeable = 1;
+ $hidden = 0;
// check if we already have a contact
// the poll url is more reliable than the profile url, as we may have
@@ -166,8 +149,6 @@ function new_contact($uid,$url,$interactive = false) {
}
$new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
- if($ret['network'] === NETWORK_DIASPORA)
- $new_relation = CONTACT_IS_FOLLOWER;
// 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`,
@@ -244,41 +225,6 @@ function new_contact($uid,$url,$interactive = false) {
proc_run('php',"include/poller.php","$contact_id");
- // create a follow slap
-
- $tpl = get_markup_template('follow_slap.tpl');
- $slap = replace_macros($tpl, array(
- '$name' => $a->user['username'],
- '$profile_page' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
- '$photo' => $a->contact['photo'],
- '$thumb' => $a->contact['thumb'],
- '$published' => datetime_convert('UTC','UTC', 'now', ATOM_TIME),
- '$item_id' => 'urn:X-dfrn:' . $a->get_hostname() . ':follow:' . random_string(),
- '$title' => '',
- '$type' => 'text',
- '$content' => t('following'),
- '$nick' => $a->user['nickname'],
- '$verb' => ACTIVITY_FOLLOW,
- '$ostat_follow' => ''
- ));
-
- $r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
- WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
- intval($uid)
- );
-
- if(count($r)) {
- if(($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
- require_once('include/salmon.php');
- slapper($r[0],$contact['notify'],$slap);
- }
- if($contact['network'] == NETWORK_DIASPORA) {
- require_once('include/diaspora.php');
- $ret = diaspora_share($a->user,$contact);
- logger('mod_follow: diaspora_share returns: ' . $ret);
- }
- }
-
$result['success'] = true;
return $result;
}