X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FRemoveUnusedAvatars.php;h=27a6ac676f39e0d9dec53e3c8a444354c5f64785;hb=088a3b6bc429973381e6eb2931c6eacd5b8c8927;hp=e8f615f62f6954c53e62c9e0e768e339b6988530;hpb=6f290607de7f10cea7429aacd0b394fd3f4c4e69;p=friendica.git diff --git a/src/Worker/RemoveUnusedAvatars.php b/src/Worker/RemoveUnusedAvatars.php index e8f615f62f..27a6ac676f 100644 --- a/src/Worker/RemoveUnusedAvatars.php +++ b/src/Worker/RemoveUnusedAvatars.php @@ -1,6 +1,6 @@ $total]); $count = 0; - $contacts = DBA::select('contact', ['id'], $condition); + $contacts = DBA::p("SELECT `contact`.`id` " . $sql, 0, '', '', '', 0); while ($contact = DBA::fetch($contacts)) { Contact::update(['photo' => '', 'thumb' => '', 'micro' => ''], ['id' => $contact['id']]); Photo::delete(['contact-id' => $contact['id'], 'photo-type' => [Photo::CONTACT_AVATAR, Photo::CONTACT_BANNER]]); @@ -51,7 +56,7 @@ class RemoveUnusedAvatars Logger::notice('We are outside of the maintenance window, quitting'); return; } - Logger::notice('In removal', ['count' => $count, 'total' => $total]); + Logger::info('In removal', ['count' => $count, 'total' => $total]); } } DBA::close($contacts);