fix: readme hidden

This commit is contained in:
qkqpttgf
2021-06-23 16:11:13 +08:00
committed by GitHub
parent 74bb87ef15
commit c6e93168af
+5 -5
View File
@@ -347,14 +347,14 @@ function main($path)
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1, 0, -1);
$files = $drive->list_files($path1);
}
if ($files['type']=='folder' && !$_SERVER['admin']) {
foreach ($files['list'] as $k => $v) {
if (isHideFile($k)) unset($files['list'][$k]);
}
}
if ($_GET['json']) {
// return a json
if ($files['type']=='folder' && !$_SERVER['admin']) {
foreach ($files['list'] as $k => $v) {
if (isHideFile($k)) unset($files['list'][$k]);
}
}
return output(json_encode($files), 200, ['Content-Type' => 'application/json']);
}
// random file