aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php2
-rw-r--r--include/poller.php13
2 files changed, 12 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index b81bd9cfc..2c7836301 100644
--- a/boot.php
+++ b/boot.php
@@ -4,7 +4,7 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.2.1027' );
+define ( 'FRIENDIKA_VERSION', '2.2.1028' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1071 );
diff --git a/include/poller.php b/include/poller.php
index 5565130e9..569eb59d1 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -310,13 +310,22 @@ function poller_run($argv, $argc){
// Upgrading DB fields from an older Friendika version
// Will only do this once per notify-enabled OStatus contact
+ // or if relationship changes
- if(($contact['notify']) && (! $contact['writable'])) {
- q("UPDATE `contact` SET `writable` = 1 WHERE `id` = %d LIMIT 1",
+ $stat_writeable = ((($contact['notify']) && ($contact['rel'] == REL_VIP || $contact['rel'] == REL_BUD)) ? 1 : 0);
+
+ if($stat_writeable != $contact['writable']) {
+ q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1",
+ intval($stat_writeable),
intval($contact['id'])
);
}
+ // Are we allowed to import from this person?
+
+ if($contact['rel'] == REL_VIP || $contact['blocked'] || $contact['readonly'])
+ continue;
+
$xml = fetch_url($contact['poll']);
}
elseif($contact['network'] === NETWORK_MAIL) {