aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dir_fns.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index b0609ce8b..88a1bb74f 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -16,7 +16,6 @@ require_once('include/permissions.php');
* @return array
*/
function find_upstream_directory($dirmode) {
- global $DIRECTORY_FALLBACK_SERVERS;
$preferred = get_config('system','directory_server');
@@ -43,10 +42,12 @@ function find_upstream_directory($dirmode) {
* directory server if you don't like our choice or if circumstances change.
*/
+ $directory_fallback_servers = get_directory_fallback_servers();
+
$dirmode = intval(get_config('system','directory_mode'));
if ($dirmode == DIRECTORY_MODE_NORMAL) {
- $toss = mt_rand(0,count($DIRECTORY_FALLBACK_SERVERS));
- $preferred = $DIRECTORY_FALLBACK_SERVERS[$toss];
+ $toss = mt_rand(0,count($directory_fallback_servers));
+ $preferred = $directory_fallback_servers[$toss];
set_config('system','directory_server',$preferred);
} else{
set_config('system','directory_server',z_root());