pull/31/head
qkqpttgf 2020-02-29 13:56:35 +08:00 committed by GitHub
parent c8b5fb65d7
commit 4610d37976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -57,10 +57,10 @@ function getConfig($str, $disktag = '')
global $Base64Env;
if ($disktag=='') $disktag = $_SERVER['disktag'];
if (in_array($str, $InnerEnv)) {
if (in_array($str, $Base64Env)) return base64_decode(equal_replace(json_decode(getenv($disktag), true)[$str],1));
if (in_array($str, $Base64Env)) return equal_replace(json_decode(getenv($disktag), true)[$str],1);
else return json_decode(getenv($disktag), true)[$str];
}
if (in_array($str, $Base64Env)) return base64_decode(equal_replace(getenv($str),1));
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
else return getenv($str);
}
@ -76,7 +76,7 @@ function setConfig($arr, $disktag = '')
$oparetdisk = 0;
foreach ($arr as $k => $v) {
if (in_array($k, $InnerEnv)) {
if (in_array($k, $Base64Env)) $diskconfig[$k] = equal_replace(base64_encode($v));
if (in_array($k, $Base64Env)) $diskconfig[$k] = equal_replace($v);
else $diskconfig[$k] = $v;
$indisk = 1;
} elseif ($k=='disktag_add') {
@ -87,7 +87,7 @@ function setConfig($arr, $disktag = '')
$tmp[$v] = '';
$oparetdisk = 1;
} else {
if (in_array($k, $Base64Env)) $tmp[$k] = equal_replace(base64_encode($v));
if (in_array($k, $Base64Env)) $tmp[$k] = equal_replace($v);
else $tmp[$k] = $v;
}
}