Minor improvements (#997)

This commit is contained in:
Roman Kelesidis 2023-10-27 14:33:25 +07:00 committed by GitHub
commit f1ad43e02e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View file

@ -1065,7 +1065,6 @@ $lang['BT_UNREGISTERED_ALREADY'] = 'Torrent already unregistered';
$lang['BT_REGISTERED'] = 'Torrent registered on tracker<br /><br />Now you need to <a href="%s"><b>download your torrent</b></a> and run it using your BitTorrent client choosing the folder with the original files you\'re sharing as the download path';
$lang['INVALID_ANN_URL'] = 'Invalid Announce URL [%s]<br /><br />must be <b>%s</b>';
$lang['PASSKEY_ERR_TOR_NOT_REG'] = 'Could not add passkey<br /><br />Torrent not registered on tracker';
$lang['PASSKEY_ERR_EMPTY'] = 'Could not add passkey (passkey is empty)<br /><br />Go to <a href="%s" target="_blank"><b>your forum profile</b></a> and generate it';
$lang['BT_PASSKEY'] = 'Passkey';
$lang['BT_GEN_PASSKEY'] = 'create a new';
$lang['BT_PASSKEY_VIEW'] = 'show';

View file

@ -253,7 +253,7 @@ class User
// Generate passkey
if (!\TorrentPier\Legacy\Torrent::getPasskey($this->data['user_id'])) {
if (!\TorrentPier\Legacy\Torrent::generate_passkey($this->data['user_id'], true)) {
bb_die('Could not generate passkey');
bb_simple_die('Could not generate passkey');
}
}

View file

@ -543,7 +543,7 @@ class Torrent
$file_contents = file_get_contents($filename);
if (!$tor = \Arokettu\Bencode\Bencode::decode($file_contents)) {
bb_die('This is not a bencoded file');
bb_die($lang['TORFILE_INVALID']);
}
$announce = $bb_cfg['ocelot']['enabled'] ? (string)($bb_cfg['ocelot']['url'] . $passkey_val . "/announce") : (string)($ann_url . "?$passkey_key=$passkey_val");