diff options
author | zottel <github@zottel.net> | 2015-09-16 09:56:11 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2015-09-16 09:56:11 +0200 |
commit | c2dac55edb9d825990b43f8f3c857a99ad491387 (patch) | |
tree | 807a02a553eaf3ac9fce51ab8351c6dd637f10e0 /mod | |
parent | 06bfd2b5025f9dc8e4672f1965b92660daac770e (diff) | |
parent | 4c5a74284bb1c2e23ef1e40c09d10f3449f8c853 (diff) | |
download | volse-hubzilla-c2dac55edb9d825990b43f8f3c857a99ad491387.tar.gz volse-hubzilla-c2dac55edb9d825990b43f8f3c857a99ad491387.tar.bz2 volse-hubzilla-c2dac55edb9d825990b43f8f3c857a99ad491387.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod')
-rw-r--r-- | mod/hostxrd.php | 3 | ||||
-rw-r--r-- | mod/siteinfo.php | 5 | ||||
-rw-r--r-- | mod/thing.php | 10 | ||||
-rw-r--r-- | mod/wfinger.php | 2 | ||||
-rw-r--r-- | mod/xrd.php | 3 |
5 files changed, 19 insertions, 4 deletions
diff --git a/mod/hostxrd.php b/mod/hostxrd.php index ef86f2dd9..0e18c133b 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -2,7 +2,8 @@ function hostxrd_init(&$a) { header('Access-Control-Allow-Origin: *'); - header("Content-type: text/xml"); + header("Content-type: application/xrd+xml"); + logger('hostxrd',LOGGER_DEBUG); $tpl = get_markup_template('xrd_host.tpl'); $x = replace_macros(get_markup_template('xrd_host.tpl'), array( diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 8281a7a0a..14aaef144 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -150,6 +150,9 @@ function siteinfo_content(&$a) { if(file_exists('doc/site_donate.html')) $donate .= file_get_contents('doc/site_donate.html'); + if(function_exists('sys_getloadavg')) + $loadavg = sys_getloadavg(); + $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('$Projectname'), '$description' => t('This is a hub of $Projectname - a global cooperative network of decentralized privacy enhanced websites.'), @@ -158,6 +161,8 @@ function siteinfo_content(&$a) { '$tag' => $tag, '$polled' => t('Last background fetch: '), '$lastpoll' => get_poller_runtime(), + '$load_average' => t('Current load average: '), + '$loadavg_all' => $loadavg[0] . ', ' . $loadavg[1] . ', ' . $loadavg[2], '$commit' => $commit, '$web_location' => t('Running at web location') . ' ' . z_root(), '$visit' => t('Please visit <a href="https://redmatrix.me">redmatrix.me</a> to learn more about $Projectname.'), diff --git a/mod/thing.php b/mod/thing.php index 03dc7db5b..280cc194d 100644 --- a/mod/thing.php +++ b/mod/thing.php @@ -234,9 +234,17 @@ function thing_init(&$a) { function thing_content(&$a) { + // @FIXME one problem with things is we can't share them unless we provide the channel in the url + // so we can definitively lookup the owner. + if(argc() == 2) { - $sql_extra = permissions_sql(); + $r = q("select obj_channel from obj where obj_type = %d and obj_obj = '%s' limit 1", + intval(TERM_OBJ_THING), + dbesc(argv(1)) + ); + if($r) + $sql_extra = permissions_sql($r[0]['obj_channel']); $r = q("select * from obj where obj_type = %d and obj_obj = '%s' $sql_extra limit 1", intval(TERM_OBJ_THING), diff --git a/mod/wfinger.php b/mod/wfinger.php index 1493dd6ba..c61a97b30 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -19,7 +19,7 @@ function wfinger_init(&$a) { } $resource = $_REQUEST['resource']; - + logger('webfinger: ' . $resource,LOGGER_DEBUG); $r = null; diff --git a/mod/xrd.php b/mod/xrd.php index d547194ad..a373f8bf5 100644 --- a/mod/xrd.php +++ b/mod/xrd.php @@ -5,6 +5,7 @@ require_once('include/crypto.php'); function xrd_init(&$a) { $uri = urldecode(notags(trim($_GET['uri']))); + logger('xrd: ' . $uri,LOGGER_DEBUG); if(substr($uri,0,4) === 'http') $name = basename($uri); @@ -31,7 +32,7 @@ function xrd_init(&$a) { $salmon_key = salmon_key($r[0]['channel_pubkey']); header('Access-Control-Allow-Origin: *'); - header("Content-type: text/xml"); + header("Content-type: application/xrd+xml"); $tpl = get_markup_template('view/xrd_person.tpl'); |