mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 02:47:27 +08:00
judge H&R count think about section
This commit is contained in:
@@ -335,7 +335,12 @@ class HitAndRunRepository extends BaseRepository
|
||||
//disable user
|
||||
/** @var User $user */
|
||||
$user = $hitAndRun->user;
|
||||
$counts = $user->hitAndRuns()->where('status', HitAndRun::STATUS_UNREACHED)->count();
|
||||
$counts = $user->hitAndRuns()
|
||||
->where('status', HitAndRun::STATUS_UNREACHED)
|
||||
->whereHas('torrent.basic_category', function (Builder $query) use ($searchBoxId) {
|
||||
return $query->where('mode', $searchBoxId);
|
||||
})
|
||||
->count();
|
||||
$disableCounts = HitAndRun::getConfig('ban_user_when_counts_reach', $searchBoxId);
|
||||
do_log("user: {$user->id}, H&R counts: $counts, disableCounts: $disableCounts", 'notice');
|
||||
if ($counts >= $disableCounts) {
|
||||
|
||||
Reference in New Issue
Block a user