clear icon cache after modify

This commit is contained in:
xiaomlove
2023-02-06 14:25:05 +08:00
parent 23ea393ffe
commit 59b7a2916e
12 changed files with 35 additions and 13 deletions

View File

@@ -109,7 +109,10 @@ if (filesize($fn) == 0) {
}
$approvalNotAllowed = $row['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW && get_setting('torrent.approval_status_none_visible') == 'no';
$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)) {
$canSeedBanned = user_can('seebanned');
$canAccessTorrent = can_access_torrent($row);
if ((($row['banned'] == 'yes' || ($approvalNotAllowed && !$allowOwnerDownload)) && !$canSeedBanned) || !$canAccessTorrent) {
do_log("[DENY_DOWNLOAD], user: {$CURUSER['id']}, approvalNotAllowed: $approvalNotAllowed, allowOwnerDownload: $allowOwnerDownload, canSeedBanned: $canSeedBanned, canAccessTorrent: $canAccessTorrent", 'error');
denyDownload();
}