X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=40f39ebebad0783a07648d97f52abc4d870a63d6;hb=d7c832748289b24741e34bc44e4906fc71a45d84;hp=18442f79588ecea0d6cd154f74c1f161ac4d8c4b;hpb=0c56e75b896cd7015271f33894b50d5dbfb0793c;p=friendica.git diff --git a/update.php b/update.php index 18442f7958..40f39ebeba 100644 --- a/update.php +++ b/update.php @@ -384,3 +384,27 @@ function update_1318() Worker::add(PRIORITY_LOW, 'ProfileUpdate'); return Update::SUCCESS; } + +function update_1323() +{ + $users = DBA::select('user', ['uid']); + while ($user = DBA::fetch($users)) { + Contact::updateSelfFromUserID($user['uid']); + } + DBA::close($users); + + 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; +} +