aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-24 20:53:28 -0700
committerfriendica <info@friendica.com>2013-07-24 20:53:28 -0700
commit1a624c10aaa7652289ea54c7846d4dcac13464b8 (patch)
tree15b84c802c1a27b143354bf9bd7bfa9486ff13f5 /mod
parentc5d456af9be934335323012385c63c93a070e82e (diff)
downloadvolse-hubzilla-1a624c10aaa7652289ea54c7846d4dcac13464b8.tar.gz
volse-hubzilla-1a624c10aaa7652289ea54c7846d4dcac13464b8.tar.bz2
volse-hubzilla-1a624c10aaa7652289ea54c7846d4dcac13464b8.zip
hide detailed site information if you're off the grid.
Diffstat (limited to 'mod')
-rw-r--r--mod/zfinger.php55
1 files changed, 32 insertions, 23 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 8e0a7d141..a3da62162 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -186,37 +186,46 @@ function zfinger_init(&$a) {
$ret['site']['directory_mode'] = 'standalone';
if($dirmode != DIRECTORY_MODE_NORMAL)
$ret['site']['directory_url'] = z_root() . '/dirsearch';
- $register_policy = intval(get_config('system','register_policy'));
- if($register_policy == REGISTER_CLOSED)
- $ret['site']['register_policy'] = 'closed';
- if($register_policy == REGISTER_APPROVE)
- $ret['site']['register_policy'] = 'approve';
- if($register_policy == REGISTER_OPEN)
- $ret['site']['register_policy'] = 'open';
- require_once('include/account.php');
- $ret['site']['accounts'] = account_total();
- require_once('include/identity.php');
- $ret['site']['channels'] = channel_total();
+ // hide detailed site information if you're off the grid
+ if($dirmode != DIRECTORY_MODE_STANDALONE) {
- $ret['site']['version'] = RED_PLATFORM . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']';
+ $register_policy = intval(get_config('system','register_policy'));
- $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'];
- }
+ if($register_policy == REGISTER_CLOSED)
+ $ret['site']['register_policy'] = 'closed';
+ if($register_policy == REGISTER_APPROVE)
+ $ret['site']['register_policy'] = 'approve';
+ if($register_policy == REGISTER_OPEN)
+ $ret['site']['register_policy'] = 'open';
+
+ require_once('include/account.php');
+ $ret['site']['accounts'] = account_total();
+
+ require_once('include/identity.php');
+ $ret['site']['channels'] = channel_total();
+
+
+ $ret['site']['version'] = RED_PLATFORM . ' ' . RED_VERSION . '[' . DB_UPDATE_VERSION . ']';
- $ret['site']['plugins'] = $visible_plugins;
- $ret['site']['sitehash'] = get_config('system','location_hash');
- $ret['site']['sitename'] = get_config('system','sitename');
+ $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