X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=40f39ebebad0783a07648d97f52abc4d870a63d6;hb=0dbce6e58ba6494daf1ad30812cdffd5a779eda4;hp=3132677ea7f5e8a7383064e51092db1a6b0573e5;hpb=f8c0f24e34e124ab782d5dcf3d2d658d70e19e5c;p=friendica.git diff --git a/update.php b/update.php index 3132677ea7..40f39ebeba 100644 --- a/update.php +++ b/update.php @@ -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; +} +