X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FUpdateContact.php;h=8de3629cafdca24ce8b0d04c60024dd46ff0b09b;hb=73742812d193ff6a22cf7d6f0a7e9703db80c1a0;hp=ae3b06b5067dc5ee2b0e22293ac2c5a2d8bf6387;hpb=6a2c0b3cc7ff6924cfbc7f46ec9427d4677a504c;p=friendica.git diff --git a/src/Worker/UpdateContact.php b/src/Worker/UpdateContact.php index ae3b06b506..8de3629caf 100644 --- a/src/Worker/UpdateContact.php +++ b/src/Worker/UpdateContact.php @@ -1,27 +1,40 @@ . + * */ namespace Friendica\Worker; use Friendica\Core\Logger; use Friendica\Model\Contact; -use Friendica\Util\DateTimeFormat; -use Friendica\Database\DBA; class UpdateContact { - public static function execute($contact_id) + /** + * Update contact data via probe + * + * @param int $contact_id Contact ID + * @return void + */ + public static function execute(int $contact_id) { $success = Contact::updateFromProbe($contact_id); - // Update the "updated" field if the contact could be probed. - // We don't do this in the function above, since we don't want to - // update the contact whenever that function is called from anywhere. - if ($success) { - DBA::update('contact', ['updated' => DateTimeFormat::utcNow()], ['id' => $contact_id]); - } Logger::info('Updated from probe', ['id' => $contact_id, 'success' => $success]); }