Commit 6de9a4e3 authored by dmorley's avatar dmorley

Merge branch 'fix-remote' into 'develop'

Fix remote

See merge request !247
parents 90d79e48 d56169be
Pipeline #2953 passed with stage
in 47 seconds
......@@ -16,6 +16,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Deprecated
### Removed
### Fixed
- update remote pods fixed
### Security
## [2.6.2] - 2019-11-24
......
This diff is collapsed.
......@@ -135,6 +135,5 @@ if (!$stop) {
echo 'Data successfully inserted! Your pod will be checked and live on the list in a few hours!';
} else {
echo 'Could not validate your pod, check your setup!<br>Take a look at your <a href="' . $nodeinfo_url . '">nodeinfo</a>';
updateMeta('add_attempt', $_domain);
}
}
......@@ -47,17 +47,16 @@ $skippods = array_merge($existingpods, $triedpods);
$foundpods = [];
//pulling all nodes for now
$federationpods = curl('https://the-federation.info/graphql?query=%7Bnodes%7Bhost%20platform%7Bname%7Dprotocols%7Bname%7D%7D%7D&raw', false, 45);
$federationpods = curl('https://the-federation.info/pods.json', false, 45);
if ($pods = json_decode($federationpods['body'] ?: '', true)) {
foreach ($pods['data']['nodes'] ?? [] as $poddata) {
$protocols = array_column($poddata['protocols'] ?? [], 'name');
foreach ($pods['pods'] ?? [] as $key => $poddata) {
$foundpods[] = strtolower(preg_replace('/(https?:\/\/)?(:(\d*))?/', '', $poddata['host']));
}
}
$diasppods = curl('https://diasp.org/pods.json', false, 45);
if ($pods = json_decode($diasppods['body'] ?: '', true)) {
foreach ($pods ?? [] as $poddata) {
foreach ($pods ?? [] as $key => $poddata) {
$foundpods[] = strtolower(preg_replace('/(https?:\/\/)?(:(\d*))?/', '', $poddata['host']));
}
}
......@@ -67,6 +66,7 @@ foreach ($results as $result) {
echo ' domain ' . $result . ' trying... ';
$add = __DIR__ . '/add.php';
echo exec("php-cgi {$add} domain={$result}") . "\r\n";
updateMeta('add_attempt', $result);
}
updateMeta('federation_updated');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment