mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
OpenWebAuth path is now fetched during probing
This commit is contained in:
parent
ea5e1f1edc
commit
da37516abf
13 changed files with 143 additions and 52 deletions
|
@ -2484,6 +2484,25 @@ class GServer
|
|||
DI::keyValue()->set('poco_last_federation_discovery', time());
|
||||
}
|
||||
|
||||
public static function updateFromProbeArray(array $data)
|
||||
{
|
||||
if (empty($data['gsid']) || empty($data['openwebauth'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$gserver = DBA::selectFirst('gserver', ['openwebauth'], ['id' => $data['gsid']]);
|
||||
if (!DBA::isResult($gserver)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($data['openwebauth'] == $gserver['openwebauth']) {
|
||||
return;
|
||||
}
|
||||
|
||||
Logger::debug('Set Open Web Auth path', ['baseurl' => $data['baseurl'], 'openwebauth' => $data['openwebauth']]);
|
||||
self::update(['openwebauth' => $data['openwebauth']], ['id' => $data['gsid']]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the protocol for the given server
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue