瀏覽代碼

fix: null value in user sub log tpl

M1Screw 1 年之前
父節點
當前提交
49805d5775
共有 3 個文件被更改,包括 10 次插入8 次删除
  1. 7 7
      composer.lock
  2. 1 1
      resources/views/tabler/user/subscribe_log.tpl
  3. 2 0
      src/Controllers/User/SubLogController.php

+ 7 - 7
composer.lock

@@ -529,16 +529,16 @@
         },
         {
             "name": "composer/ca-bundle",
-            "version": "1.3.7",
+            "version": "1.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/ca-bundle.git",
-                "reference": "76e46335014860eec1aa5a724799a00a2e47cc85"
+                "reference": "b66d11b7479109ab547f9405b97205640b17d385"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/ca-bundle/zipball/76e46335014860eec1aa5a724799a00a2e47cc85",
-                "reference": "76e46335014860eec1aa5a724799a00a2e47cc85",
+                "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b66d11b7479109ab547f9405b97205640b17d385",
+                "reference": "b66d11b7479109ab547f9405b97205640b17d385",
                 "shasum": ""
             },
             "require": {
@@ -550,7 +550,7 @@
                 "phpstan/phpstan": "^0.12.55",
                 "psr/log": "^1.0",
                 "symfony/phpunit-bridge": "^4.2 || ^5",
-                "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
+                "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
             },
             "type": "library",
             "extra": {
@@ -585,7 +585,7 @@
             "support": {
                 "irc": "irc://irc.freenode.org/composer",
                 "issues": "https://github.com/composer/ca-bundle/issues",
-                "source": "https://github.com/composer/ca-bundle/tree/1.3.7"
+                "source": "https://github.com/composer/ca-bundle/tree/1.4.0"
             },
             "funding": [
                 {
@@ -601,7 +601,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-08-30T09:31:38+00:00"
+            "time": "2023-12-18T12:05:55+00:00"
         },
         {
             "name": "dasprid/enum",

+ 1 - 1
resources/views/tabler/user/subscribe_log.tpl

@@ -9,7 +9,7 @@
                         <span class="home-title">订阅记录</span>
                     </h2>
                     <div class="page-pretitle my-3">
-                        <span class="home-subtitle">在最近 {$config['subscribeLog_keep_days']} 天内所有的订阅记录</span>
+                        <span class="home-subtitle">在最近 {$subscribe_log_retention_days} 天内所有的订阅记录</span>
                     </div>
                 </div>
             </div>

+ 2 - 0
src/Controllers/User/SubLogController.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Controllers\User;
 
 use App\Controllers\BaseController;
+use App\Models\Config;
 use App\Models\SubscribeLog;
 use App\Utils\Tools;
 use Exception;
@@ -28,6 +29,7 @@ final class SubLogController extends BaseController
         }
 
         return $response->write($this->view()
+            ->assign('subscribe_log_retention_days', Config::obtain('subscribe_log_retention_days'))
             ->assign('logs', $logs)
             ->fetch('user/subscribe_log.tpl'));
     }