torrentpier/library/includes/datastore/build_attach_extensions.php
2023-01-27 18:30:34 +07:00

26 lines
785 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* TorrentPier Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2023 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
if (!defined('BB_ROOT')) {
die(basename(__FILE__));
}
// Don't count on forbidden extensions table, because it is not allowed to allow forbidden extensions at all
$extensions = DB()->fetch_rowset("
SELECT
e.extension, g.cat_id, g.download_mode, g.upload_icon
FROM
" . BB_EXTENSIONS . " e,
" . BB_EXTENSION_GROUPS . " g
WHERE
e.group_id = g.group_id
AND g.allow_group = 1
");
$this->store('attach_extensions', $extensions);