diff --git a/boot.php b/boot.php index b81bd9cfc7..2c7836301a 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 5565130e99..569eb59d1c 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) {