From 0e7b5adf76bc7536804b1b19b0a21617a927ddd5 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Tue, 6 Sep 2022 20:56:08 +0800 Subject: [PATCH] improve userdetails page claim btn display --- include/constants.php | 2 +- public/getusertorrentlistajax.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/constants.php b/include/constants.php index e1d5ff46..07693973 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ "."". str_replace(" ", "
", gettime($arr['completedat'],false)). ""; if ($showanonymous) $ret .= "".$arr['anonymous'].""; - if ($showActionClaim) { + $claimButton = ''; + if ($showActionClaim && \App\Models\Claim::getConfigIsEnabled() && \Carbon\Carbon::parse($arr['added'])->addDays($claimTorrentTTL)->lte(\Carbon\Carbon::now())) { $claim = $claimData->get($arr['torrent']); $claimButton = $claimRep->buildActionButtons($arr['torrent'], $claim); - $ret .= sprintf('%s', $claimButton); } + $ret .= sprintf('%s', $claimButton); $ret .="\n"; }