Added documentation
This commit is contained in:
parent
ae64f6f7e2
commit
d2bad13e83
19
mod/poco.php
19
mod/poco.php
|
@ -27,25 +27,30 @@ function poco_init(App $a) {
|
||||||
$justme = false;
|
$justme = false;
|
||||||
$global = false;
|
$global = false;
|
||||||
|
|
||||||
if($a->argc > 1 && $a->argv[1] === '@server') {
|
if ($a->argc > 1 && $a->argv[1] === '@server') {
|
||||||
|
// List of all servers that this server knows
|
||||||
$ret = poco_serverlist();
|
$ret = poco_serverlist();
|
||||||
header('Content-type: application/json');
|
header('Content-type: application/json');
|
||||||
echo json_encode($ret);
|
echo json_encode($ret);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
if($a->argc > 1 && $a->argv[1] === '@global') {
|
if ($a->argc > 1 && $a->argv[1] === '@global') {
|
||||||
|
// List of all profiles that this server recently had data from
|
||||||
$global = true;
|
$global = true;
|
||||||
$update_limit = date("Y-m-d H:i:s", time() - 30 * 86400);
|
$update_limit = date("Y-m-d H:i:s", time() - 30 * 86400);
|
||||||
}
|
}
|
||||||
if($a->argc > 2 && $a->argv[2] === '@me')
|
if ($a->argc > 2 && $a->argv[2] === '@me') {
|
||||||
$justme = true;
|
$justme = true;
|
||||||
if($a->argc > 3 && $a->argv[3] === '@all')
|
}
|
||||||
|
if ($a->argc > 3 && $a->argv[3] === '@all') {
|
||||||
$justme = false;
|
$justme = false;
|
||||||
if($a->argc > 3 && $a->argv[3] === '@self')
|
}
|
||||||
|
if ($a->argc > 3 && $a->argv[3] === '@self') {
|
||||||
$justme = true;
|
$justme = true;
|
||||||
if($a->argc > 4 && intval($a->argv[4]) && $justme == false)
|
}
|
||||||
|
if ($a->argc > 4 && intval($a->argv[4]) && $justme == false)
|
||||||
$cid = intval($a->argv[4]);
|
$cid = intval($a->argv[4]);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$system_mode AND !$global) {
|
if(!$system_mode AND !$global) {
|
||||||
$r = q("SELECT `user`.*,`profile`.`hide-friends` from user left join profile on `user`.`uid` = `profile`.`uid`
|
$r = q("SELECT `user`.*,`profile`.`hide-friends` from user left join profile on `user`.`uid` = `profile`.`uid`
|
||||||
|
|
Loading…
Reference in a new issue