aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-20 00:27:01 -0800
committerfriendica <info@friendica.com>2012-12-20 00:27:01 -0800
commitf6dc0fe26fc7fec63b956255623f6c1bc068f755 (patch)
tree53c7a5f39f97bcf705a1bfb6dc517d49c4fa9c77 /mod/zfinger.php
parenta813b043d91e0d0087cf6ffad6609ab6c75a3081 (diff)
downloadvolse-hubzilla-f6dc0fe26fc7fec63b956255623f6c1bc068f755.tar.gz
volse-hubzilla-f6dc0fe26fc7fec63b956255623f6c1bc068f755.tar.bz2
volse-hubzilla-f6dc0fe26fc7fec63b956255623f6c1bc068f755.zip
directory discovery
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index f00819522..a8dc5c5c8 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -123,6 +123,20 @@ function zfinger_init(&$a) {
}
}
+ $ret['site'] = array();
+ $ret['site']['url'] = z_root();
+ $dirmode = get_config('system','directory_mode');
+ if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL))
+ $ret['site']['directory_mode'] = 'normal';
+ if($dirmode == DIRECTORY_MODE_MASTER)
+ $ret['site']['directory_mode'] = 'master';
+ elseif($dirmode == DIRECTORY_MODE_SECONDARY)
+ $ret['site']['directory_mode'] = 'secondary';
+ elseif($dirmode == DIRECTORY_MODE_STANDALONE)
+ $ret['site']['directory_mode'] = 'standalone';
+ if($dirmode != DIRECTORY_MODE_NORMAL)
+ $ret['site']['directory_url'] = z_root() . '/dir';
+
json_return_and_die($ret);
} \ No newline at end of file