diff options
author | friendica <info@friendica.com> | 2015-02-01 15:10:52 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-01 15:10:52 -0800 |
commit | b1a92d620ebf760a3cfd83f6fb62990494d3ad60 (patch) | |
tree | 4c0ec66005b3867bc8ae005f0cf6950a4ab7dcb4 /mod/zfinger.php | |
parent | acac58fba0cc5fa82cb1b74f536ba602dd237238 (diff) | |
download | volse-hubzilla-b1a92d620ebf760a3cfd83f6fb62990494d3ad60.tar.gz volse-hubzilla-b1a92d620ebf760a3cfd83f6fb62990494d3ad60.tar.bz2 volse-hubzilla-b1a92d620ebf760a3cfd83f6fb62990494d3ad60.zip |
two tracks proceeding in parallel - first adding the ability to store a digital signature with ratings so that directories can pass them around, second provide some directory registration functions so we can obtain a list of directories from somewhere (to pass ratings around between them). This gives the primary directory role some value as that is where you register your directory.
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r-- | mod/zfinger.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index 6f4febc6f..f4b7efd96 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -99,13 +99,14 @@ function zfinger_init(&$a) { $id = $e['channel_id']; + $sys_channel = (($e['channel_pageflags'] & PAGE_SYSTEM) ? true : false); $special_channel = (($e['channel_pageflags'] & PAGE_PREMIUM) ? true : false); $adult_channel = (($e['channel_pageflags'] & PAGE_ADULT) ? true : false); $censored = (($e['channel_pageflags'] & PAGE_CENSORED) ? true : false); $searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true); $deleted = (($e['xchan_flags'] & XCHAN_FLAGS_DELETED) ? true : false); - if($deleted || $censored) + if($deleted || $censored || $sys_channel) $searchable = false; $public_forum = false; @@ -237,6 +238,12 @@ function zfinger_init(&$a) { $dirmode = get_config('system','directory_mode'); if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL)) $ret['site']['directory_mode'] = 'normal'; + + // downgrade mis-configured primaries + + if($dirmode == DIRECTORY_MODE_PRIMARY && z_root() != get_directory_primary()) + $dirmode = DIRECTORY_MODE_SECONDARY; + if($dirmode == DIRECTORY_MODE_PRIMARY) $ret['site']['directory_mode'] = 'primary'; elseif($dirmode == DIRECTORY_MODE_SECONDARY) |