aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-17 17:48:41 -0700
committerfriendica <info@friendica.com>2014-08-17 17:48:41 -0700
commit82eb265a20d73beff7673299a6c4ab8a4d8b8673 (patch)
tree8e67b7f7a86f800e810d7c45f15368ce91c748bc /include/zot.php
parentbf3dc80233147a1dab9f034a192750f765d0436b (diff)
downloadvolse-hubzilla-82eb265a20d73beff7673299a6c4ab8a4d8b8673.tar.gz
volse-hubzilla-82eb265a20d73beff7673299a6c4ab8a4d8b8673.tar.bz2
volse-hubzilla-82eb265a20d73beff7673299a6c4ab8a4d8b8673.zip
add collections widget to connections page - and some more work on realms
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index bd9526f2d..8dcc19522 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -989,8 +989,22 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
// Are we a directory server of some kind?
+ $other_realm = false;
+ $realm = get_directory_realm();
+ if(array_key_exists('site',$arr)
+ && array_key_exists('realm',$arr['site'])
+ && (strpos($arr['site']['realm'],$realm) !== false))
+ $other_realm = true;
+
if($dirmode != DIRECTORY_MODE_NORMAL) {
- if(array_key_exists('profile',$arr) && is_array($arr['profile'])) {
+
+ // We're some kind of directory server. However we can only add directory information
+ // if the entry is in the same realm (or is a sub-realm). Sub-realms are denoted by
+ // including the parent realm in the name. e.g. 'RED_GLOBAL:foo' would allow an entry to
+ // be in directories for the local realm (foo) and also the RED_GLOBAL realm.
+
+
+ if(array_key_exists('profile',$arr) && is_array($arr['profile']) && (! $other_realm)) {
$profile_changed = import_directory_profile($xchan_hash,$arr['profile'],$address,$ud_flags, 1);
if($profile_changed) {
$what .= 'profile ';