aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-08 14:11:38 -0700
committerfriendica <info@friendica.com>2015-03-08 14:11:38 -0700
commitb5683bfac4fd5e0e6cc15995c5c4f574e54e33da (patch)
treea1d1ecb52c8863b6244783713123a5331aa09102 /include/diaspora.php
parent480dac1af2dd5ed5ba3105577559568237fe5d80 (diff)
downloadvolse-hubzilla-b5683bfac4fd5e0e6cc15995c5c4f574e54e33da.tar.gz
volse-hubzilla-b5683bfac4fd5e0e6cc15995c5c4f574e54e33da.tar.bz2
volse-hubzilla-b5683bfac4fd5e0e6cc15995c5c4f574e54e33da.zip
change default affinity (abook_closeness) to 80 for all new connections going forward (was 99). This way it can be adjusted down later without requiring you to change all your existing connections upward (since your existing connections are likely all sitting at 99 at the moment). The default setting is also configurable with a pconfig system.new_abook_closeness
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 553c7474c..7295b4261 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -709,13 +709,19 @@ function diaspora_request($importer,$xml) {
$their_perms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK|PERMS_W_STREAM|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT|PERMS_R_STORAGE|PERMS_R_PAGES;
+
+ $closeness = get_pconfig($importer['channel_id'],'system','new_abook_closeness');
+ if($closeness === false)
+ $closeness = 80;
+
+
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_my_perms, abook_their_perms, abook_closeness, abook_rating, abook_created, abook_updated, abook_connected, abook_dob, abook_flags) values ( %d, %d, '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', %d )",
intval($importer['channel_account_id']),
intval($importer['channel_id']),
dbesc($ret['xchan_hash']),
intval($default_perms),
intval($their_perms),
- intval(99),
+ intval($closeness),
intval(0),
dbesc(datetime_convert()),
dbesc(datetime_convert()),