2015-11-05 23:47:54 +00:00
|
|
|
<?php
|
2018-01-25 02:08:45 +00:00
|
|
|
|
2017-11-15 15:53:16 +00:00
|
|
|
/**
|
2017-11-15 21:12:33 +00:00
|
|
|
* @file src/Worker/UpdateGcontact.php
|
2017-11-15 15:53:16 +00:00
|
|
|
*/
|
2018-01-25 02:08:45 +00:00
|
|
|
|
2017-11-18 07:33:44 +00:00
|
|
|
namespace Friendica\Worker;
|
|
|
|
|
2018-10-29 21:20:46 +00:00
|
|
|
use Friendica\Core\Logger;
|
2019-07-03 05:46:35 +00:00
|
|
|
use Friendica\Model\GContact;
|
2018-07-21 12:40:21 +00:00
|
|
|
use Friendica\Database\DBA;
|
2017-01-18 21:45:32 +00:00
|
|
|
|
2018-01-25 02:08:45 +00:00
|
|
|
class UpdateGContact
|
|
|
|
{
|
2019-07-03 05:46:35 +00:00
|
|
|
public static function execute($url, $command = '')
|
2018-01-25 02:08:45 +00:00
|
|
|
{
|
2019-07-03 05:46:35 +00:00
|
|
|
$force = ($command == "force");
|
2015-11-05 23:47:54 +00:00
|
|
|
|
2019-07-03 05:46:35 +00:00
|
|
|
$success = GContact::updateFromProbe($url, $force);
|
2015-11-05 23:47:54 +00:00
|
|
|
|
2019-07-03 05:46:35 +00:00
|
|
|
Logger::info('Updated from probe', ['url' => $url, 'force' => $force, 'success' => $success]);
|
2017-11-15 21:12:33 +00:00
|
|
|
}
|
2015-11-05 23:47:54 +00:00
|
|
|
}
|