diff --git a/themes/beauty/controller/CommandController.php b/themes/beauty/controller/CommandController.php index feaacb2..54efa9e 100644 --- a/themes/beauty/controller/CommandController.php +++ b/themes/beauty/controller/CommandController.php @@ -117,10 +117,7 @@ eof; echo "{$botLogPrefix} Main bot started @{$thisTime}\n"; - //$menus = array(); //菜单,一级目录 - //$htmlReadme = array(); //Readme.md 内容,底部网站详细介绍 - //$htmlCateReadme = ''; //当前目录下的Readme.md 内容 - //$menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序 + //TODO: 跳过加密的目录扫描,或者在保存到年、月索引数据的时候,跳过加密目录下的文件 while (true) { $time = date('Y-m-d H:i:s'); diff --git a/themes/beauty/controller/ListController.php b/themes/beauty/controller/ListController.php index 05bb10a..d0569e3 100644 --- a/themes/beauty/controller/ListController.php +++ b/themes/beauty/controller/ListController.php @@ -456,12 +456,21 @@ Class ListController extends Controller { $htmlCateReadme = ''; //当前目录下的Readme.md 内容 $copyright = ''; + //获取根目录下的readme $cacheKey = $this->getCacheKey('root', 'readme', $maxScanDeep); $readmeFile = Common::getCacheFromFile($cacheKey, $expireSeconds); + if (!empty($readmeFile)) { + $htmlReadme = $readmeFile['htmlReadme']; + } + + if (!empty($readmeFile['copyright'])) { + $copyright = $readmeFile['copyright']; + } $cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep); $mp3File = Common::getCacheFromFile($cacheKey, $expireSeconds); + //翻页支持 $page = $this->get('page', 1); $pageSize = $this->get('limit', FSC::$app['config']['default_page_size']);