|
|
@ -67,13 +67,6 @@ Class SiteController extends Controller { |
|
|
|
if (!empty($readmeFile['sort'])) { |
|
|
|
if (!empty($readmeFile['sort'])) { |
|
|
|
$menus_sorted = explode("\n", $readmeFile['sort']); |
|
|
|
$menus_sorted = explode("\n", $readmeFile['sort']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$titles = $scanner->getMDTitles($readmeFile['id']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$Parsedown = new Parsedown(); |
|
|
|
|
|
|
|
$content = file_get_contents($readmeFile['realpath']); |
|
|
|
|
|
|
|
$htmlReadme = $Parsedown->text($content); |
|
|
|
|
|
|
|
$htmlReadme = $scanner->fixMDUrls($readmeFile['realpath'], $htmlReadme); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//排序 |
|
|
|
//排序 |
|
|
@ -86,16 +79,19 @@ Class SiteController extends Controller { |
|
|
|
Common::saveCacheToFile($cacheKey, $menus); //保存目录数据 |
|
|
|
Common::saveCacheToFile($cacheKey, $menus); //保存目录数据 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取联系方式 |
|
|
|
|
|
|
|
$titles = array(); |
|
|
|
|
|
|
|
$readmeFile = $scanner->getDefaultReadme(); |
|
|
|
|
|
|
|
if (!empty($readmeFile)) { |
|
|
|
|
|
|
|
$titles = $scanner->getMDTitles($readmeFile['id']); |
|
|
|
|
|
|
|
|
|
|
|
//获取当前目录下的readme |
|
|
|
|
|
|
|
$cateReadmeFile = $scanner->getDefaultReadme($defaultCateId); |
|
|
|
|
|
|
|
if (!empty($cateReadmeFile)) { |
|
|
|
|
|
|
|
$Parsedown = new Parsedown(); |
|
|
|
$Parsedown = new Parsedown(); |
|
|
|
$content = file_get_contents($cateReadmeFile['realpath']); |
|
|
|
$content = file_get_contents($readmeFile['realpath']); |
|
|
|
$htmlCateReadme = $Parsedown->text($content); |
|
|
|
$htmlReadme = $Parsedown->text($content); |
|
|
|
$htmlCateReadme = $scanner->fixMDUrls($cateReadmeFile['realpath'], $htmlCateReadme); |
|
|
|
$htmlReadme = $scanner->fixMDUrls($readmeFile['realpath'], $htmlReadme); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//优先从缓存获取默认mp3文件 |
|
|
|
//优先从缓存获取默认mp3文件 |
|
|
|
$cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep); |
|
|
|
$cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep); |
|
|
|
$mp3File = Common::getCacheFromFile($cacheKey); |
|
|
|
$mp3File = Common::getCacheFromFile($cacheKey); |
|
|
|