Issue 7659: Udate the "user-contact" value with the "contact" values
This commit is contained in:
parent
482af202f5
commit
1075bfb189
|
@ -34,7 +34,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1326);
|
define('DB_UPDATE_VERSION', 1327);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
12
update.php
12
update.php
|
@ -396,3 +396,15 @@ function update_1323()
|
||||||
return Update::SUCCESS;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user