|
|
|
@ -8,6 +8,8 @@ require_once __DIR__ . '/../../../plugins/Common.php';
@@ -8,6 +8,8 @@ require_once __DIR__ . '/../../../plugins/Common.php';
|
|
|
|
|
require_once __DIR__ . '/../../../plugins/Html.php'; |
|
|
|
|
|
|
|
|
|
Class ListController extends Controller { |
|
|
|
|
protected $dateIndexCacheKey = 'MainBotDateIndex'; |
|
|
|
|
protected $noOriginalCtimeFilesCacheKey = 'MainBotNoOriginalCtimeFiles'; |
|
|
|
|
|
|
|
|
|
public function actionIndex() { |
|
|
|
|
$cateId = $this->get('id', ''); |
|
|
|
@ -300,10 +302,14 @@ Class ListController extends Controller {
@@ -300,10 +302,14 @@ Class ListController extends Controller {
|
|
|
|
|
|
|
|
|
|
$isAdminIp = Common::isAdminIp($this->getUserIp()); //判断是否拥有管理权限 |
|
|
|
|
|
|
|
|
|
//从缓存文件获取按年份、月份归类的索引数据 |
|
|
|
|
$cacheDataByDate = Common::getCacheFromFile($this->dateIndexCacheKey, 86400*365); |
|
|
|
|
|
|
|
|
|
$viewName = '//site/index'; //共享视图 |
|
|
|
|
$params = compact( |
|
|
|
|
'cateId', 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'breadcrumbs', 'htmlCateReadme', |
|
|
|
|
'mp3File', 'page', 'pageSize', 'cacheDataId', 'copyright', 'showType', 'isAdminIp', 'allFiles' |
|
|
|
|
'mp3File', 'page', 'pageSize', 'cacheDataId', 'copyright', 'showType', 'isAdminIp', 'allFiles', |
|
|
|
|
'cacheDataByDate' |
|
|
|
|
); |
|
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
|
} |
|
|
|
|