From 4a8bd8aa9044ec54828f40a76bb3a48054b46439 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 17 Mar 2020 11:38:16 +0800 Subject: [PATCH] add hideFunctionalityFile --- theme/classic.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/theme/classic.php b/theme/classic.php index 896b0e1..f42c76e 100644 --- a/theme/classic.php +++ b/theme/classic.php @@ -244,13 +244,13 @@ foreach ($files['children'] as $file) { // Files if (isset($file['file'])) { - if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) { - if (strtolower($file['name']) === 'head.md') $head = $file; - if (strtolower($file['name']) === 'readme.md') $readme = $file; - if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) { - $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body']; - return output($html,200); - } + if (strtolower($file['name']) === 'head.md') $head = $file; + if (strtolower($file['name']) === 'readme.md') $readme = $file; + if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) { + $html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body']; + return output($html,200); + } + if ($_SERVER['admin'] or !isHideFile($file['name'])) { $filenum++; ?>