Example #1
0
        case 'notify_clear_items':
        case 'notify_clearitem':
        case 'notify_clear_filter':
        case 'notify_cleargroup':
        case 'notify_catchup':
        case 'notify_catchup_filter':
            authorize();
            enforce_login();
            require SERVER_ROOT . '/sections/torrents/notify_actions.php';
            break;
        case 'download':
            require SERVER_ROOT . '/sections/torrents/download.php';
            break;
        case 'regen_filelist':
            if (check_perms('users_mod') && !empty($_GET['torrentid']) && is_number($_GET['torrentid'])) {
                Torrents::regenerate_filelist($_GET['torrentid']);
                header('Location: torrents.php?torrentid=' . $_GET['torrentid']);
                die;
            } else {
                error(403);
            }
            break;
        case 'fix_group':
            if ((check_perms('users_mod') || check_perms('torrents_fix_ghosts')) && authorize() && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
                $DB->query('
					SELECT COUNT(ID)
					FROM torrents
					WHERE GroupID = ' . $_GET['groupid']);
                list($Count) = $DB->next_record();
                if ($Count == 0) {
                    Torrents::delete_group($_GET['groupid']);