Browse Source

bug fix: readme and copyright show in year, month page

master
filesite 4 weeks ago
parent
commit
ea471aef4f
  1. 5
      themes/beauty/controller/CommandController.php
  2. 9
      themes/beauty/controller/ListController.php

5
themes/beauty/controller/CommandController.php

@ -117,10 +117,7 @@ eof; @@ -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');

9
themes/beauty/controller/ListController.php

@ -456,12 +456,21 @@ Class ListController extends Controller { @@ -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']);

Loading…
Cancel
Save