From e58ad35fb020fe8ab3599487129c27b3db123052 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Mon, 14 Sep 2015 16:42:32 +0200 Subject: Update siteinfo.php --- mod/siteinfo.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod') 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 redmatrix.me to learn more about $Projectname.'), -- cgit v1.2.3 From 325a5b4af4f75322730ef1d2134d789581ed8378 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 14 Sep 2015 21:25:10 -0700 Subject: we need an owner for permissions_sql --- mod/thing.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mod') 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), -- cgit v1.2.3 From 93f5cc1e609611d030c3e0480291ac6f70d22487 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 15 Sep 2015 01:24:55 -0700 Subject: I'm not going to tell you what's wrong because I'll be accused of bashing another project. I'll let you read the logs and figure it out for yourself. Follow the trail of evidence and you'll discover the truth. --- mod/hostxrd.php | 1 + mod/wfinger.php | 2 +- mod/xrd.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/hostxrd.php b/mod/hostxrd.php index ef86f2dd9..24bd7b048 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -3,6 +3,7 @@ function hostxrd_init(&$a) { header('Access-Control-Allow-Origin: *'); header("Content-type: text/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/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..a3a73dc4f 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); -- cgit v1.2.3 From 4c5a74284bb1c2e23ef1e40c09d10f3449f8c853 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 15 Sep 2015 21:47:01 -0700 Subject: serve as application/xrd+xml --- mod/hostxrd.php | 2 +- mod/xrd.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/hostxrd.php b/mod/hostxrd.php index 24bd7b048..0e18c133b 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -2,7 +2,7 @@ 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'); diff --git a/mod/xrd.php b/mod/xrd.php index a3a73dc4f..a373f8bf5 100644 --- a/mod/xrd.php +++ b/mod/xrd.php @@ -32,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'); -- cgit v1.2.3