diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-10 07:36:51 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-10 07:36:51 +0100 |
commit | b782c46e518afd0713f92fabb76aea9a7c3e5d77 (patch) | |
tree | c28dc5d4f45988a01c56876d1ae41d92a73d6191 /include/dir_fns.php | |
parent | eaa47760bc7bb024b4c41bd41be62fd16f1237ec (diff) | |
parent | 7ec687988746e1037d86d25186c2dd5f2addb15b (diff) | |
download | volse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.tar.gz volse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.tar.bz2 volse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r-- | include/dir_fns.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php index e5f0e1e2b..398f43d00 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -15,6 +15,19 @@ function find_upstream_directory($dirmode) { global $DIRECTORY_FALLBACK_SERVERS; $preferred = get_config('system','directory_server'); + + // Thwart attempts to use a private directory + + if(($preferred) && ($prefered != z_root())) { + $r = q("select * from site where site_url = '%s' limit 1", + dbesc($preferred) + ); + if(($r) && ($r[0]['site_flags'] & DIRECTORY_MODE_STADALONE)) { + $preferred = ''; + } + } + + if (! $preferred) { /* |