Merge branch '1.7' into php8

This commit is contained in:
xiaomlove
2022-12-04 03:19:33 +08:00
+2 -1
View File
@@ -108,7 +108,8 @@ if (filesize($fn) == 0) {
httperr();
}
$approvalNotAllowed = $row['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW && get_setting('torrent.approval_status_none_visible') == 'no';
if ((($row['banned'] == 'yes' || $approvalNotAllowed) && !user_can('seebanned')) || !can_access_torrent($row)) {
$allowOwnerDownload = $row['owner'] == $CURUSER['id'] && \App\Models\Snatch::query()->where('torrentid', $id)->count() == 0;
if ((($row['banned'] == 'yes' || ($approvalNotAllowed && !$allowOwnerDownload)) && !user_can('seebanned')) || !can_access_torrent($row)) {
denyDownload();
}