mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
parent
ea8d2d76a4
commit
23456902e3
3 changed files with 12 additions and 12 deletions
|
@ -55,14 +55,13 @@ For installation, you need to follow a few simple steps:
|
|||
3. After run `composer install` on the project directory
|
||||
4. Create database and import dump located at **install/sql/mysql.sql**
|
||||
5. Edit database configuration settings in the configuration file or a local copy (see below)
|
||||
6. Edit domain name in the configuration file or a local copy (see below)
|
||||
7. Edit domain ssl setting in the configuration file or a local copy (see below)
|
||||
8. Edit this files:
|
||||
6. Edit domain name in the configuration file or a local copy (`$reserved_name` and `$reserved_port`)
|
||||
7. Edit this files:
|
||||
1. **favicon.png** (change on your own)
|
||||
2. **robots.txt** (change the addresses in lines **Host** and **Sitemap** on your own)
|
||||
3. **opensearch_desc.xml** (change the description and address on your own)
|
||||
4. **opensearch_desc_bt.xml** (change the description and address on your own)
|
||||
9. Log in to the forum with admin/admin login/password and finish setting up via admin panel
|
||||
8. Log in to the forum with admin/admin login/password and finish setting up via admin panel
|
||||
|
||||
## 🔑 Access rights on folders and files
|
||||
|
||||
|
|
14
filelist.php
14
filelist.php
|
@ -14,7 +14,7 @@ $user->session_start();
|
|||
|
||||
if ($bb_cfg['bt_disable_dht'] && IS_GUEST) {
|
||||
http_response_code(403);
|
||||
die($lang['BT_PRIVATE_TRACKER']);
|
||||
bb_simple_die($lang['BT_PRIVATE_TRACKER']);
|
||||
}
|
||||
|
||||
$topic_id = !empty($_GET['topic']) ? (int)$_GET['topic'] : (http_response_code(404) && die($lang['INVALID_TOPIC_ID']));
|
||||
|
@ -30,19 +30,19 @@ $row = DB()->fetch_row($sql);
|
|||
|
||||
if (empty($row) || empty($row['physical_filename'])) {
|
||||
http_response_code(404);
|
||||
die($lang['TOPIC_POST_NOT_EXIST']);
|
||||
bb_simple_die($lang['TOPIC_POST_NOT_EXIST']);
|
||||
}
|
||||
|
||||
if (empty($row['info_hash_v2'])) {
|
||||
http_response_code(410);
|
||||
die($lang['BT_V2_FLIST_ONLY']);
|
||||
bb_simple_die($lang['BT_V2_FLIST_ONLY']);
|
||||
}
|
||||
|
||||
$file_path = get_attachments_dir() . '/' . $row['physical_filename'];
|
||||
|
||||
if (!is_file($file_path)) {
|
||||
http_response_code(410);
|
||||
die($lang['TOR_NOT_FOUND']);
|
||||
bb_simple_die($lang['TOR_NOT_FOUND']);
|
||||
}
|
||||
|
||||
$file_contents = file_get_contents($file_path);
|
||||
|
@ -54,7 +54,7 @@ if ($bb_cfg['flist_max_files']) {
|
|||
|
||||
if ($file_count > $bb_cfg['flist_max_files']) {
|
||||
http_response_code(410);
|
||||
die(sprintf($lang['BT_V2_FLIST_LIMIT'], $bb_cfg['flist_max_files'], $file_count));
|
||||
bb_simple_die(sprintf($lang['BT_V2_FLIST_LIMIT'], $bb_cfg['flist_max_files'], $file_count));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,12 +62,12 @@ try {
|
|||
$torrent = \Arokettu\Bencode\Bencode::decode($file_contents, dictType: \Arokettu\Bencode\Bencode\Collection::ARRAY);
|
||||
} catch (\Exception $e) {
|
||||
http_response_code(410);
|
||||
die(htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}"));
|
||||
bb_simple_die(htmlCHR("{$lang['TORFILE_INVALID']}: {$e->getMessage()}"));
|
||||
}
|
||||
|
||||
if (isset($torrent['info']['private']) && IS_GUEST) {
|
||||
http_response_code(403);
|
||||
die($lang['BT_PRIVATE_TORRENT']);
|
||||
bb_simple_die($lang['BT_PRIVATE_TORRENT']);
|
||||
}
|
||||
|
||||
$files = (new TorrentPier\Legacy\TorrentFileList($torrent))->fileTreeTable($torrent['info']['file tree']);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
User-agent: *
|
||||
|
||||
Disallow: /bt/*
|
||||
Disallow: /dl.php
|
||||
Disallow: /group.php
|
||||
|
@ -10,4 +11,4 @@ Disallow: /privmsg.php
|
|||
Disallow: /profile.php
|
||||
|
||||
Host: torrentpier.com
|
||||
Sitemap: http://torrentpier.com/sitemap.xml
|
||||
Sitemap: http://torrentpier.com/sitemap/sitemap.xml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue