diff --git a/common.php b/common.php index efb0cb6..a09d1f3 100644 --- a/common.php +++ b/common.php @@ -2225,7 +2225,18 @@ function render_list($path = '', $files = []) while (strpos($html, '')) $html = str_replace('', '', $html); } - if ($_SERVER['ishidden']==4) { + if ($_SERVER['ishidden']<4 || ($files['type']=='file'&&getConfig('downloadencrypt', $_SERVER['disktag']))) { + while (strpos($html, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + while (strpos($html, '')) { + $html = str_replace('', '', $html); + $html = str_replace('', '', $html); + } + } else { // 加密状态 if (getConfig('useBasicAuth')) { // use Basic Auth @@ -2300,17 +2311,6 @@ function render_list($path = '', $files = []) $tmp = splitfirst($tmp[1], ''); $html .= $tmp[1]; } - } else { - while (strpos($html, '')) { - $tmp = splitfirst($html, ''); - $html = $tmp[0]; - $tmp = splitfirst($tmp[1], ''); - $html .= $tmp[1]; - } - while (strpos($html, '')) { - $html = str_replace('', '', $html); - $html = str_replace('', '', $html); - } } while (strpos($html, '')) $html = str_replace('', getconstStr('Download'), $html);