From c5d456af9be934335323012385c63c93a070e82e Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 24 Jul 2013 20:35:54 -0700 Subject: add more siteinfo --- include/crypto.php | 2 -- mod/zfinger.php | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/crypto.php b/include/crypto.php index 1a62d60af..a0268ef93 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -17,8 +17,6 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') { return $verify; } - - function pkcs5_pad ($text, $blocksize) { $pad = $blocksize - (strlen($text) % $blocksize); diff --git a/mod/zfinger.php b/mod/zfinger.php index 12a24259e..8e0a7d141 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -201,8 +201,22 @@ function zfinger_init(&$a) { $ret['site']['channels'] = channel_total(); + $ret['site']['version'] = RED_PLATFORM . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']'; + $ret['site']['admin'] = get_config('system','admin_email'); + $visible_plugins = array(); + if(is_array($a->plugins) && count($a->plugins)) { + $r = q("select * from addon where hidden = 0"); + if($r) + foreach($r as $rr) + $visible_plugins[] = $rr['name']; + } + + $ret['site']['plugins'] = $visible_plugins; + $ret['site']['sitehash'] = get_config('system','location_hash'); + $ret['site']['sitename'] = get_config('system','sitename'); + json_return_and_die($ret); } \ No newline at end of file -- cgit v1.2.3