if there is 'index.html', then do not show file but show the html

pull/4/head
qkqpttgf 2020-01-29 20:51:00 +08:00 committed by GitHub
parent 84599c32d7
commit 1d36bd3213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -857,11 +857,12 @@ function render_list($path, $files)
$theme = getConfig('theme');
if ( $theme=='' || !file_exists('theme/'.$theme) ) $theme = 'classic.php';
include 'theme/'.$theme;
$htmlpage = include 'theme/'.$theme;
$html = '<!--
github https://github.com/qkqpttgf/OneManager-php
-->' . ob_get_clean();
if (isset($htmlpage['statusCode'])) return $htmlpage;
if ($_SERVER['Set-Cookie']!='') return output($html, $statusCode, [ 'Set-Cookie' => $_SERVER['Set-Cookie'], 'Content-Type' => 'text/html' ]);
return output($html,$statusCode);
}