From ec9dd27fd970b495d33765ff0a705c2d582a077a Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 20 Jan 2020 13:23:52 +0800 Subject: [PATCH] fix:domain path --- function/common.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/function/common.php b/function/common.php index a0399f7..4726831 100644 --- a/function/common.php +++ b/function/common.php @@ -65,18 +65,22 @@ function config_oauth() function getListpath($domain) { - $domain_path = getConfig('domain_path'); - /*$tmp_path=''; - if ($domain_path!='') { - $tmp = explode("|",$domain_path); + $domain_path1 = getConfig('domain_path'); + $public_path = getConfig('public_path'); + $tmp_path=''; + if ($domain_path1!='') { + $tmp = explode("|",$domain_path1); foreach ($tmp as $multidomain_paths){ $pos = strpos($multidomain_paths,":"); + $domain1 = substr($multidomain_paths,0,$pos); $tmp_path = path_format(substr($multidomain_paths,$pos+1)); - if (substr($multidomain_paths,0,$pos)==$host_name) $private_path=$tmp_path; + $domain_path[$domain1] = $tmp_path; + if ($public_path=='') $public_path = $tmp_path; + //if (substr($multidomain_paths,0,$pos)==$host_name) $private_path=$tmp_path; } - }*/ + } if (isset($domain_path[$domain])) return spurlencode($domain_path[$domain],'/'); - return spurlencode(getConfig('public_path'),'/'); + return spurlencode($public_path,'/'); } function path_format($path)