]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Fix: Newer Friendica servers had been detected as ActivityPub
[friendica.git] / update.php
index 3132677ea7f5e8a7383064e51092db1a6b0573e5..40f39ebebad0783a07648d97f52abc4d870a63d6 100644 (file)
@@ -396,3 +396,15 @@ function update_1323()
        return Update::SUCCESS;
 }
 
+function update_1327()
+{
+       $contacts = DBA::select('contact', ['uid', 'id', 'blocked', 'readonly'], ["`uid` != ? AND (`blocked` OR `readonly`) AND NOT `pending`", 0]);
+       while ($contact = DBA::fetch($contacts)) {
+               Contact::setBlockedForUser($contact['id'], $contact['uid'], $contact['blocked']);
+               Contact::setIgnoredForUser($contact['id'], $contact['uid'], $contact['readonly']);
+       }
+       DBA::close($contacts);
+
+       return Update::SUCCESS;
+}
+