TorrentPier Aurochs release preparation.

This commit is contained in:
Yuriy Pikhtarev 2017-06-12 15:15:04 +03:00
commit 3e8b494572
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
21 changed files with 709 additions and 502 deletions

View file

@ -40,7 +40,7 @@ if (!$torrent) {
}
$filename = get_attachments_dir() . '/' . $torrent['physical_filename'];
if (!$file_contents = file_get_contents($filename)) {
if (file_exists($filename) && !$file_contents = file_get_contents($filename)) {
if (IS_AM) {
$this->ajax_die($lang['ERROR_NO_ATTACHMENT'] . "\n\n" . htmlCHR($filename));
} else {
@ -48,7 +48,7 @@ if (!$file_contents = file_get_contents($filename)) {
}
}
if (!$tor = bdecode($file_contents)) {
if (!$tor = \Rych\Bencode\Bencode::decode($file_contents)) {
return $lang['TORFILE_INVALID'];
}