add more siteinfo

This commit is contained in:
friendica 2013-07-24 20:35:54 -07:00
parent 36f63573c5
commit c5d456af9b
2 changed files with 14 additions and 2 deletions

View File

@ -17,8 +17,6 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
return $verify; return $verify;
} }
function pkcs5_pad ($text, $blocksize) function pkcs5_pad ($text, $blocksize)
{ {
$pad = $blocksize - (strlen($text) % $blocksize); $pad = $blocksize - (strlen($text) % $blocksize);

View File

@ -201,8 +201,22 @@ function zfinger_init(&$a) {
$ret['site']['channels'] = channel_total(); $ret['site']['channels'] = channel_total();
$ret['site']['version'] = RED_PLATFORM . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']';
$ret['site']['admin'] = get_config('system','admin_email'); $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); json_return_and_die($ret);
} }