mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Use centralized function to update contact entries
This commit is contained in:
parent
a4b0ab90b1
commit
9c14eb0c6b
20 changed files with 90 additions and 72 deletions
|
@ -44,7 +44,7 @@ class RemoveUnusedAvatars
|
|||
$count = 0;
|
||||
$contacts = DBA::select('contact', ['id'], $condition);
|
||||
while ($contact = DBA::fetch($contacts)) {
|
||||
DBA::update('contact', ['photo' => '', 'thumb' => '', 'micro' => ''], ['id' => $contact['id']]);
|
||||
Contact::update(['photo' => '', 'thumb' => '', 'micro' => ''], ['id' => $contact['id']]);
|
||||
Photo::delete(['contact-id' => $contact['id'], 'album' => Photo::CONTACT_PHOTOS]);
|
||||
if ((++$count % 1000) == 0) {
|
||||
if (!Worker::isInMaintenanceWindow()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue