mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
Changes:
- added more missing type-hints (checked them in body of the method) - reformatted code a little (code-style) - moved '/.well-known/host-meta' to constant Probe::HOST_META
This commit is contained in:
parent
a7e9457ef2
commit
5306bb3e31
4 changed files with 101 additions and 64 deletions
|
@ -1359,9 +1359,10 @@ class Contact
|
|||
'writable' => 1,
|
||||
'blocked' => 0,
|
||||
'readonly' => 0,
|
||||
'pending' => 0];
|
||||
'pending' => 0,
|
||||
];
|
||||
|
||||
$condition = ['nurl' => Strings::normaliseLink($data["url"]), 'uid' => $uid, 'deleted' => false];
|
||||
$condition = ['nurl' => Strings::normaliseLink($data['url']), 'uid' => $uid, 'deleted' => false];
|
||||
|
||||
// Before inserting we do check if the entry does exist now.
|
||||
$contact = DBA::selectFirst('contact', ['id'], $condition, ['order' => ['id']]);
|
||||
|
|
|
@ -1325,7 +1325,7 @@ class GServer
|
|||
private static function validHostMeta(string $url): bool
|
||||
{
|
||||
$xrd_timeout = DI::config()->get('system', 'xrd_timeout');
|
||||
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta', HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
|
||||
$curlResult = DI::httpClient()->get($url . Probe::HOST_META, HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue