mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
We can now return a list of known servers
This commit is contained in:
parent
ec9dddb445
commit
b42167f0ac
2 changed files with 30 additions and 6 deletions
15
mod/poco.php
15
mod/poco.php
|
@ -27,6 +27,12 @@ function poco_init(App $a) {
|
|||
$justme = false;
|
||||
$global = false;
|
||||
|
||||
if($a->argc > 1 && $a->argv[1] === '@server') {
|
||||
$ret = poco_serverlist();
|
||||
header('Content-type: application/json');
|
||||
echo json_encode($ret);
|
||||
killme();
|
||||
}
|
||||
if($a->argc > 1 && $a->argv[1] === '@global') {
|
||||
$global = true;
|
||||
$update_limit = date("Y-m-d H:i:s", time() - 30 * 86400);
|
||||
|
@ -314,11 +320,9 @@ function poco_init(App $a) {
|
|||
|
||||
$ret['entry'][] = $entry;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
$ret['entry'][] = array();
|
||||
}
|
||||
else
|
||||
} else
|
||||
http_status_exit(500);
|
||||
|
||||
logger("End of poco", LOGGER_DEBUG);
|
||||
|
@ -332,8 +336,7 @@ function poco_init(App $a) {
|
|||
header('Content-type: application/json');
|
||||
echo json_encode($ret);
|
||||
killme();
|
||||
}
|
||||
else
|
||||
} else
|
||||
http_status_exit(500);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue