cleanup delete unconfirmred accounts + rss check special section permission

This commit is contained in:
xiaomlove
2023-01-16 23:56:56 +08:00
parent 95ac3e950a
commit 3e7522ceca
3 changed files with 13 additions and 9 deletions

View File

@@ -87,9 +87,13 @@ $limit .= $showrows;
//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")
{