Merge branch '1.7' into php8

This commit is contained in:
xiaomlove
2023-01-16 23:57:45 +08:00
2 changed files with 12 additions and 8 deletions
+5 -1
View File
@@ -111,9 +111,13 @@ if (!$hasSticky) {
//approval status
$approvalStatusNoneVisible = get_setting('torrent.approval_status_none_visible');
if ($approvalStatusNoneVisible == 'no' && !user_can('staffmem')) {
if ($approvalStatusNoneVisible == 'no' && !user_can('staffmem', false, $user['id'])) {
$where .= ($where ? " AND " : "") . "torrents.approval_status = " . \App\Models\Torrent::APPROVAL_STATUS_ALLOW;
}
//check special section permission
if (get_setting('main.spsct') == 'yes' && !user_can('view_special_torrent', false, $user['id'])) {
$where .= ($where ? " AND " : "") . "categories.mode = " . get_setting('main.browsecat');
}
function get_where($tablename = "sources", $itemname = "source", $getname = "sou")
{