From 9805d0fac62893ef3d999eef7bc1bbc2ac0d27e0 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Thu, 13 Apr 2023 01:33:35 +0800 Subject: [PATCH] fix issue 176+177 --- include/constants.php | 2 +- include/functions.php | 8 ++++++-- public/modtask.php | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/constants.php b/include/constants.php index b6bfb3af..af281f01 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ listLeechingSeedingStatus($CURUSER['id'], $torrentIdArr); $tagRep = new \App\Repositories\TagRepository(); $torrentTagCollection = \App\Models\TorrentTag::query()->whereIn('torrent_id', $torrentIdArr)->get(); @@ -3680,8 +3683,9 @@ foreach ($rows as $row) } print(""); - echo $torrent->renderTorrentsPageAverageRating($row); - + if ($enableImdb || $enablePtGen) { + echo $torrent->renderTorrentsPageAverageRating($row); + } $act = ""; if ($CURUSER["dlicon"] != 'no' && $CURUSER["downloadpos"] != "no") $act .= "\"download\"" ; diff --git a/public/modtask.php b/public/modtask.php index 572d0a0e..b2f7817f 100644 --- a/public/modtask.php +++ b/public/modtask.php @@ -26,8 +26,9 @@ if ($action == "confirmuser") if ($action == "edituser") { $userid = $_POST["userid"]; - $userInfo = \App\Models\User::query()->findOrFail($userid, ['id', 'passkey']); - $class = intval($_POST["class"] ?? 0); + $userInfo = \App\Models\User::query()->findOrFail($userid); +// $class = intval($_POST["class"] ?? 0); + $class = $userInfo->class; $vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no'); $vip_until = !empty($_POST["vip_until"]) ? $_POST['vip_until'] : null;