From 3ab624df5157f584a37223013ab1117377c4042b Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 10 Jul 2024 08:52:18 +0800 Subject: [PATCH] bug fix for mp3 file get --- themes/beauty/controller/SiteController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 7345c3e..0954df5 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -100,7 +100,7 @@ Class SiteController extends Controller { $cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep); $mp3File = Common::getCacheFromFile($cacheKey); if (empty($mp3File)) { - $mp3File = $scanner->getDefaultFile('mp3', $defaultCateId); + $mp3File = $scanner->getDefaultFile('mp3'); if (!empty($mp3File)) { Common::saveCacheToFile($cacheKey, $mp3File); } @@ -126,7 +126,7 @@ Class SiteController extends Controller { return $this->render($viewName, $params, $pageTitle); } - //TODO: 清空所有缓存 + //清空所有缓存 public function actionCleancache() { $code = 1; $msg = 'OK'; @@ -136,7 +136,7 @@ Class SiteController extends Controller { $files = scandir($cacheDir); foreach($files as $file) { if (!preg_match('/\.json$/i', $file)) {continue;} - + unlink("{$cacheDir}{$file}"); } }catch(Exception $e) {