mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
improve torrent-approval notice
This commit is contained in:
+2
-2
@@ -812,7 +812,7 @@ $approvalStatusIconEnabled = get_setting('torrent.approval_status_icon_enabled')
|
||||
$approvalStatus = null;
|
||||
$showApprovalStatusFilter = false;
|
||||
//when enable approval status icon, all user can use this filter, otherwise only staff member and approval none visible is 'no' can use
|
||||
if ($approvalStatusIconEnabled == 'yes' || (user_can('staffmem') && $approvalStatusNoneVisible == 'no')) {
|
||||
if ($approvalStatusIconEnabled == 'yes' || (user_can('torrent-approval') && $approvalStatusNoneVisible == 'no')) {
|
||||
$showApprovalStatusFilter = true;
|
||||
}
|
||||
//when user can use approval status filter, and pass `approval_status` parameter, will affect
|
||||
@@ -820,7 +820,7 @@ if ($approvalStatusIconEnabled == 'yes' || (user_can('staffmem') && $approvalSta
|
||||
if ($showApprovalStatusFilter && isset($_REQUEST['approval_status']) && is_numeric($_REQUEST['approval_status'])) {
|
||||
$approvalStatus = intval($_REQUEST['approval_status']);
|
||||
$wherea[] = "torrents.approval_status = $approvalStatus";
|
||||
} elseif ($approvalStatusNoneVisible == 'no' && !user_can('staffmem')) {
|
||||
} elseif ($approvalStatusNoneVisible == 'no' && !user_can('torrent-approval')) {
|
||||
$wherea[] = "torrents.approval_status = " . \App\Models\Torrent::APPROVAL_STATUS_ALLOW;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user