Protocol::PHANTOM], ['nurl' => Strings::normaliseLink($contact['url'])]); continue; } if (in_array($urlparts['host'], ['twitter.com', 'identi.ca'])) { $networks = ['twitter.com' => Protocol::TWITTER, 'identi.ca' => Protocol::PUMPIO]; DBA::update('gcontact', ['network' => $networks[$urlparts['host']]], ['nurl' => Strings::normaliseLink($contact['url'])]); continue; } $server_url = Contact::getBasepath($contact['url']); $force_update = false; if (!empty($contact['server_url'])) { $force_update = (Strings::normaliseLink($contact['server_url']) != Strings::normaliseLink($server_url)); $server_url = $contact['server_url']; } if ((empty($server_url) && ($contact['network'] == Protocol::FEED)) || $force_update || GServer::check($server_url, $contact['network'])) { Logger::info('Check profile', ['profile' => $contact['url']]); Worker::add(PRIORITY_LOW, 'UpdateGContact', $contact['url'], 'force'); if (++$checked > 100) { return; } } else { DBA::update('gcontact', ['last_failure' => DateTimeFormat::utcNow()], ['nurl' => Strings::normaliseLink($contact['url'])]); } // Quit the loop after 3 minutes if (time() > ($starttime + 180)) { return; } } } }