Nodeinfo: Include the sitename
This commit is contained in:
parent
986eee48ac
commit
c18c598baf
|
@ -126,7 +126,8 @@ function nodeinfo_init(&$a){
|
||||||
$nodeinfo["usage"]["localPosts"] = (int)get_config("nodeinfo","local_posts");
|
$nodeinfo["usage"]["localPosts"] = (int)get_config("nodeinfo","local_posts");
|
||||||
$nodeinfo["usage"]["localComments"] = (int)get_config("nodeinfo","local_comments");
|
$nodeinfo["usage"]["localComments"] = (int)get_config("nodeinfo","local_comments");
|
||||||
|
|
||||||
$nodeinfo["metadata"] = new stdClass();
|
//$nodeinfo["metadata"] = new stdClass();
|
||||||
|
$nodeinfo["metadata"] = array("nodeName" => $a->config["sitename"]);
|
||||||
|
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||||
|
@ -221,10 +222,10 @@ function nodeinfo_cron() {
|
||||||
set_config('nodeinfo','local_comments', $local_comments);
|
set_config('nodeinfo','local_comments', $local_comments);
|
||||||
|
|
||||||
// Now trying to register
|
// Now trying to register
|
||||||
//$url = "http://the-federation.info/register/".$a->get_hostname();
|
$url = "http://the-federation.info/register/".$a->get_hostname();
|
||||||
//logger('nodeinfo_cron: registering url: '.$url, LOGGER_DEBUG);
|
logger('registering url: '.$url, LOGGER_DEBUG);
|
||||||
//$ret = fetch_url($url);
|
$ret = fetch_url($url);
|
||||||
//logger('nodeinfo_cron: registering answer: '.$ret, LOGGER_DEBUG);
|
logger('registering answer: '.$ret, LOGGER_DEBUG);
|
||||||
|
|
||||||
logger("cron_end");
|
logger("cron_end");
|
||||||
set_config('nodeinfo','last_calucation', time());
|
set_config('nodeinfo','last_calucation', time());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user