"CheckServer" is now "UpdateGServer"

This commit is contained in:
Michael 2019-12-21 18:11:51 +00:00
parent 598f314577
commit 26ac9a0063
3 changed files with 7 additions and 7 deletions

View file

@ -0,0 +1,28 @@
<?php
/**
* @file src/Worker/UpdateGServer.php
*/
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Model\GServer;
use Friendica\Util\Strings;
class UpdateGServer
{
// Searches for the poco server list.
public static function execute($server_url)
{
if (empty($server_url)) {
return;
}
$server_url = filter_var($server_url, FILTER_SANITIZE_URL);
if (substr(Strings::normaliseLink($server_url), 0, 7) != 'http://') {
return;
}
$ret = GServer::check($server_url);
Logger::info('Updated gserver', ['url' => $server_url, 'result' => $ret]);
}
}