fix:domain path

pull/4/head
qkqpttgf 2020-01-20 13:23:52 +08:00 committed by GitHub
parent db588f894c
commit ec9dd27fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions

View File

@ -65,18 +65,22 @@ function config_oauth()
function getListpath($domain) function getListpath($domain)
{ {
$domain_path = getConfig('domain_path'); $domain_path1 = getConfig('domain_path');
/*$tmp_path=''; $public_path = getConfig('public_path');
if ($domain_path!='') { $tmp_path='';
$tmp = explode("|",$domain_path); if ($domain_path1!='') {
$tmp = explode("|",$domain_path1);
foreach ($tmp as $multidomain_paths){ foreach ($tmp as $multidomain_paths){
$pos = strpos($multidomain_paths,":"); $pos = strpos($multidomain_paths,":");
$domain1 = substr($multidomain_paths,0,$pos);
$tmp_path = path_format(substr($multidomain_paths,$pos+1)); $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],'/'); if (isset($domain_path[$domain])) return spurlencode($domain_path[$domain],'/');
return spurlencode(getConfig('public_path'),'/'); return spurlencode($public_path,'/');
} }
function path_format($path) function path_format($path)