mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
r565
Удаление лимита одновременно раздаваемых торрентов (нарушает принципы свободного файлообмена); принудительное автоматическое создание пасскея и размещение в торрент-файле информации об издателе и странице-источнике; новая функция для страницы "смерти" скрипта без какого-либо оформления; фикс неверного опознания файла, который нельзя бенкодировать; фикс добавления поисковых слов, некорректного постинга смайликов в некоторых окружениях; фикс некорректной загрузки торрент-файлов в новой версии Opera; отмена отключения DHT в Azureus; отладка скрипта выдачи торрент-файла; замена пары значений в SQL-дампе базы. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@565 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
438ef8fb1f
commit
2bd1394906
9 changed files with 71 additions and 199 deletions
|
@ -562,16 +562,13 @@ INSERT INTO `bb_config` VALUES ('birthday_max_age', '99');
|
|||
INSERT INTO `bb_config` VALUES ('birthday_min_age', '10');
|
||||
INSERT INTO `bb_config` VALUES ('birthday_check_day', '7');
|
||||
INSERT INTO `bb_config` VALUES ('bt_add_auth_key', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_add_comment', '');
|
||||
INSERT INTO `bb_config` VALUES ('bt_add_publisher', 'YourSiteName');
|
||||
INSERT INTO `bb_config` VALUES ('bt_allow_spmode_change', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_announce_url', 'http://yourdomain.com/bt/announce.php');
|
||||
INSERT INTO `bb_config` VALUES ('bt_announce_url', 'http://demo.torrentpier.me/bt/announce.php');
|
||||
INSERT INTO `bb_config` VALUES ('bt_disable_dht', '0');
|
||||
INSERT INTO `bb_config` VALUES ('bt_check_announce_url', '0');
|
||||
INSERT INTO `bb_config` VALUES ('bt_del_addit_ann_urls', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_dl_list_only_1st_page', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_dl_list_only_count', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_gen_passkey_on_reg', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_newtopic_auto_reg', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_replace_ann_url', '1');
|
||||
INSERT INTO `bb_config` VALUES ('bt_search_bool_mode', '1');
|
||||
|
@ -615,7 +612,7 @@ INSERT INTO `bb_config` VALUES ('seed_bonus_release', '');
|
|||
INSERT INTO `bb_config` VALUES ('seed_bonus_points', '');
|
||||
INSERT INTO `bb_config` VALUES ('seed_bonus_tor_size', '0');
|
||||
INSERT INTO `bb_config` VALUES ('seed_bonus_user_regdate', '0');
|
||||
INSERT INTO `bb_config` VALUES ('site_desc', 'A _little_ text to describe your forum');
|
||||
INSERT INTO `bb_config` VALUES ('site_desc', 'A little text to describe your forum');
|
||||
INSERT INTO `bb_config` VALUES ('sitename', 'TorrentPier II - Torrent Tracker');
|
||||
INSERT INTO `bb_config` VALUES ('smilies_path', 'images/smiles');
|
||||
INSERT INTO `bb_config` VALUES ('topics_per_page', '50');
|
||||
|
|
|
@ -22,9 +22,7 @@ $cfg = array();
|
|||
|
||||
// All config names with default values
|
||||
$default_cfg_str = array(
|
||||
'bt_announce_url' => 'http://yourdomain.com/bt/',
|
||||
'bt_add_comment' => '',
|
||||
'bt_add_publisher' => '',
|
||||
'bt_announce_url' => 'http://demo.torrentpier.me/bt/',
|
||||
);
|
||||
|
||||
$default_cfg_bool = array(
|
||||
|
@ -34,7 +32,6 @@ $default_cfg_bool = array(
|
|||
'bt_show_dl_list' => 0,
|
||||
'bt_dl_list_only_1st_page' => 1,
|
||||
'bt_dl_list_only_count' => 1,
|
||||
'bt_gen_passkey_on_reg' => 1,
|
||||
'bt_replace_ann_url' => 1,
|
||||
'bt_show_ip_only_moder' => 1,
|
||||
'bt_show_port_only_moder' => 1,
|
||||
|
|
|
@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||
$bb_cfg['tp_release_date'] = '21-01-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R564';
|
||||
$bb_cfg['tp_release_date'] = '23-01-2014';
|
||||
$bb_cfg['tp_release_state'] = 'R565';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
@ -191,11 +191,6 @@ $rating_limits = array(
|
|||
'0.6' => 3,
|
||||
);
|
||||
|
||||
// Seeding torrents limit
|
||||
$bb_cfg['max_seeding_torrents'] = 0; // 0 - unlimited
|
||||
$bb_cfg['min_up_speed_per_torrent'] = 500; // bytes
|
||||
$bb_cfg['too_many_seeding_redirect_url'] = 'viewtopic.php?t=TOPIC_ID';
|
||||
|
||||
// DL-Status
|
||||
$bb_cfg['dl_will_days_keep'] = 60; // days to keep user's dlstatus records
|
||||
$bb_cfg['dl_down_days_keep'] = 30;
|
||||
|
|
|
@ -117,7 +117,7 @@ function generate_smilies($mode)
|
|||
{
|
||||
if (empty($rowset[$row['smile_url']]))
|
||||
{
|
||||
$rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code']));
|
||||
$rowset[$row['smile_url']]['code'] = addslashes($row['code']);
|
||||
$rowset[$row['smile_url']]['emoticon'] = $row['emoticon'];
|
||||
$num_smilies++;
|
||||
}
|
||||
|
@ -142,8 +142,8 @@ function generate_smilies($mode)
|
|||
$template->assign_block_vars('smilies_row.smilies_col', array(
|
||||
'SMILEY_CODE' => $data['code'],
|
||||
'SMILEY_IMG' => $bb_cfg['smilies_path'] . '/' . $smile_url,
|
||||
'SMILEY_DESC' => $data['emoticon'])
|
||||
);
|
||||
'SMILEY_DESC' => $data['emoticon'],
|
||||
));
|
||||
|
||||
$s_colspan = max($s_colspan, $col + 1);
|
||||
|
||||
|
@ -167,8 +167,8 @@ function generate_smilies($mode)
|
|||
$template->assign_block_vars('switch_smilies_extra', array());
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_MORE_SMILIES' => "posting.php?mode=smilies")
|
||||
);
|
||||
'U_MORE_SMILIES' => POSTING_URL ."?mode=smilies",
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
@ -292,14 +292,11 @@ function strip_quotes ($text)
|
|||
/**
|
||||
* Strips away bbcode from a given string, leaving plain text
|
||||
*
|
||||
* @param string Text to be stripped of bbcode tags
|
||||
* @param bool $stripquotes
|
||||
* @param bool $fast_and_dirty
|
||||
* @param bool $showlinks
|
||||
* @internal param \If $boolean true, strip away quote tags AND their contents
|
||||
* @internal param \If $boolean true, use the fast-and-dirty method rather than the shiny and nice method
|
||||
* @param string Text to be stripped of bbcode tags
|
||||
* @param boolean If true, strip away quote tags AND their contents
|
||||
* @param boolean If true, use the fast-and-dirty method rather than the shiny and nice method
|
||||
*
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
function strip_bbcode ($message, $stripquotes = true, $fast_and_dirty = false, $showlinks = true)
|
||||
{
|
||||
|
@ -420,9 +417,9 @@ function replace_synonyms ($text)
|
|||
return ($syn_match && $syn_replace) ? str_replace($syn_match, $syn_replace, $text) : $text;
|
||||
}
|
||||
|
||||
function add_search_words ($post_id, $post_message, $post_title = '', $only_return_words = false)
|
||||
function add_search_words ($post_id, $post_message, $topic_title = '', $only_return_words = false)
|
||||
{
|
||||
$text = $post_title .' '. $post_message;
|
||||
$text = $topic_title .' '. $post_message;
|
||||
$text = strip_bbcode_uid($text);
|
||||
$words = ($text) ? extract_search_words($text) : array();
|
||||
|
||||
|
|
|
@ -1954,6 +1954,19 @@ function message_die ($msg_code, $msg_text = '', $msg_title = '', $err_line = ''
|
|||
exit;
|
||||
}
|
||||
|
||||
function bb_simple_die ($txt)
|
||||
{
|
||||
global $bb_cfg;
|
||||
|
||||
if (!empty($_COOKIE['explain']))
|
||||
{
|
||||
bb_die("bb_simple_die:<br /><br />$txt");
|
||||
}
|
||||
|
||||
header('Content-Type: text/plain; charset='. $bb_cfg['charset']);
|
||||
die($txt);
|
||||
}
|
||||
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path);
|
||||
|
|
|
@ -228,49 +228,19 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
|||
$forum_id = $torrent['forum_id'];
|
||||
$poster_id = $torrent['poster_id'];
|
||||
|
||||
if ($torrent['extension'] !== TORRENT_EXT)
|
||||
{
|
||||
torrent_error_exit($lang['NOT_TORRENT']);
|
||||
}
|
||||
|
||||
if (!$torrent['allow_reg_tracker'])
|
||||
{
|
||||
torrent_error_exit($lang['REG_NOT_ALLOWED_IN_THIS_FORUM']);
|
||||
}
|
||||
|
||||
if ($post_id != $torrent['topic_first_post_id'])
|
||||
{
|
||||
torrent_error_exit($lang['ALLOWED_ONLY_1ST_POST_REG']);
|
||||
}
|
||||
|
||||
if ($torrent['tracker_status'])
|
||||
{
|
||||
torrent_error_exit($lang['ALREADY_REG']);
|
||||
}
|
||||
|
||||
if ($this_topic_torrents = get_registered_torrents($topic_id, 'topic'))
|
||||
{
|
||||
torrent_error_exit($lang['ONLY_1_TOR_PER_TOPIC']);
|
||||
}
|
||||
if ($torrent['extension'] !== TORRENT_EXT) return torrent_error_exit($lang['NOT_TORRENT']);
|
||||
if (!$torrent['allow_reg_tracker']) return torrent_error_exit($lang['REG_NOT_ALLOWED_IN_THIS_FORUM']);
|
||||
if ($post_id != $torrent['topic_first_post_id']) return torrent_error_exit($lang['ALLOWED_ONLY_1ST_POST_REG']);
|
||||
if ($torrent['tracker_status']) return torrent_error_exit($lang['ALREADY_REG']);
|
||||
if ($this_topic_torrents = get_registered_torrents($topic_id, 'topic')) return torrent_error_exit($lang['ONLY_1_TOR_PER_TOPIC']);
|
||||
|
||||
torrent_auth_check($forum_id, $torrent['poster_id']);
|
||||
|
||||
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
|
||||
|
||||
if (!is_file($filename))
|
||||
{
|
||||
torrent_error_exit('File name error');
|
||||
}
|
||||
|
||||
if (!file_exists($filename))
|
||||
{
|
||||
torrent_error_exit('File not exists');
|
||||
}
|
||||
|
||||
if (!$tor = bdecode_file($filename))
|
||||
{
|
||||
torrent_error_exit('This is not a bencoded file');
|
||||
}
|
||||
if (!is_file($filename)) return torrent_error_exit('File name error');
|
||||
if (!file_exists($filename)) return torrent_error_exit('File not exists');
|
||||
if (!$tor = bdecode_file($filename)) return torrent_error_exit('This is not a bencoded file');
|
||||
|
||||
if ($bb_cfg['bt_disable_dht'])
|
||||
{
|
||||
|
@ -290,43 +260,33 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
|||
if (!$ann || !in_array($ann, $announce_urls))
|
||||
{
|
||||
$msg = sprintf($lang['INVALID_ANN_URL'], htmlspecialchars($ann), $announce_urls['main_url']);
|
||||
torrent_error_exit($msg);
|
||||
return torrent_error_exit($msg);
|
||||
}
|
||||
}
|
||||
|
||||
$info = (@$tor['info']) ? $tor['info'] : array();
|
||||
|
||||
if (!@$info['name'] || !@$info['piece length'] || !@$info['pieces'] || strlen($info['pieces']) % 20 != 0)
|
||||
if (!isset($info['name']) || !isset($info['piece length']) || !isset($info['pieces']) || strlen($info['pieces']) % 20 != 0)
|
||||
{
|
||||
torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
return torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
}
|
||||
|
||||
$info_hash = pack('H*', sha1(bencode($info)));
|
||||
$info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
|
||||
$info_hash_md5 = md5($info_hash);
|
||||
|
||||
$sql = "SELECT topic_id
|
||||
FROM ". BB_BT_TORRENTS ."
|
||||
WHERE info_hash = '$info_hash_sql'
|
||||
LIMIT 1";
|
||||
|
||||
if (!$result = DB()->sql_query($sql))
|
||||
if ($row = DB()->fetch_row("SELECT topic_id FROM ". BB_BT_TORRENTS ." WHERE info_hash = '$info_hash_sql' LIMIT 1"))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not obtain torrent info', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
if ($row = DB()->sql_fetchrow($result))
|
||||
{
|
||||
$msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
|
||||
torrent_error_exit($msg);
|
||||
return torrent_error_exit(sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']));
|
||||
}
|
||||
|
||||
$totallen = 0;
|
||||
|
||||
if (@$info['length'])
|
||||
if (isset($info['length']))
|
||||
{
|
||||
$totallen = (float) $info['length'];
|
||||
}
|
||||
else if (@$info['files'] && is_array($info['files']))
|
||||
else if (isset($info['files']) && is_array($info['files']))
|
||||
{
|
||||
foreach ($info['files'] as $fn => $f)
|
||||
{
|
||||
|
@ -335,7 +295,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
|||
}
|
||||
else
|
||||
{
|
||||
torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
return torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
}
|
||||
|
||||
$reg_time = TIMENOW;
|
||||
|
@ -352,7 +312,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
|||
|
||||
if ($sql_error['code'] == 1062) // Duplicate entry
|
||||
{
|
||||
torrent_error_exit($lang['BT_REG_FAIL_SAME_HASH']);
|
||||
return torrent_error_exit($lang['BT_REG_FAIL_SAME_HASH']);
|
||||
}
|
||||
message_die(GENERAL_ERROR, 'Could not register torrent on tracker', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
@ -445,17 +405,9 @@ function send_torrent_with_passkey ($filename)
|
|||
|
||||
if (!$passkey_val)
|
||||
{
|
||||
if ($bb_cfg['bt_gen_passkey_on_reg'])
|
||||
if (!$passkey_val = generate_passkey($user_id))
|
||||
{
|
||||
if (!$passkey_val = generate_passkey($user_id))
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not insert passkey', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$mess = sprintf($lang['PASSKEY_ERR_EMPTY'], "profile.php?mode=editprofile#bittorrent");
|
||||
message_die(GENERAL_ERROR, $mess);
|
||||
bb_simple_die('Could not generate passkey');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -482,35 +434,6 @@ function send_torrent_with_passkey ($filename)
|
|||
}
|
||||
}
|
||||
|
||||
// Seeding torrents limit
|
||||
if ($bb_cfg['max_seeding_torrents'] && IS_USER)
|
||||
{
|
||||
$seeding = DB()->fetch_row("
|
||||
SELECT COUNT(DISTINCT topic_id) AS torrents, SUM(speed_up) AS sum_up
|
||||
FROM ". BB_BT_TRACKER ."
|
||||
WHERE user_id = $user_id
|
||||
AND seeder = 1
|
||||
");
|
||||
|
||||
if ($seeding && $seeding['torrents'] > $bb_cfg['max_seeding_torrents'] && $bt_userdata['u_up_total'] < 200*1024*1024*1024)
|
||||
{
|
||||
if ($seeding['sum_up'] < ($seeding['torrents'] * $bb_cfg['min_up_speed_per_torrent']))
|
||||
{
|
||||
$msg = array();
|
||||
$msg[] = date('m-d H:i:s');
|
||||
$msg[] = sprintf('%-30s', html_entity_decode($userdata['username'])." ($user_id)");
|
||||
$msg[] = sprintf('%-3s', $seeding['torrents']);
|
||||
$msg[] = sprintf('%.2f', @$user_ratio);
|
||||
$msg[] = sprintf('%-9s', humn_size($bt_userdata['u_up_total'], '', '', ' '));
|
||||
$msg[] = humn_size($seeding['sum_up'], '', '', ' ');
|
||||
$msg = join(LOG_SEPR, $msg) . LOG_LF;
|
||||
bb_log($msg, 'overseed/current');
|
||||
|
||||
redirect($bb_cfg['too_many_seeding_redirect_url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Announce URL
|
||||
$ann_url = $bb_cfg['bt_announce_url'];
|
||||
|
||||
|
@ -538,59 +461,33 @@ function send_torrent_with_passkey ($filename)
|
|||
}
|
||||
|
||||
// Add publisher & topic url
|
||||
$publisher = $bb_cfg['bt_add_publisher'];
|
||||
$publisher_url = ($post_id) ? make_url(POST_URL . $post_id) : '';
|
||||
$publisher_name = $bb_cfg['server_name'];
|
||||
$publisher_url = make_url(TOPIC_URL . $topic_id);
|
||||
|
||||
if ($publisher)
|
||||
{
|
||||
$tor['publisher'] = strval($publisher);
|
||||
unset($tor['publisher.utf-8']);
|
||||
$tor['publisher'] = strval($publisher_name);
|
||||
unset($tor['publisher.utf-8']);
|
||||
|
||||
if ($publisher_url)
|
||||
{
|
||||
$tor['publisher-url'] = strval($publisher_url);
|
||||
unset($tor['publisher-url.utf-8']);
|
||||
}
|
||||
}
|
||||
$tor['publisher-url'] = strval($publisher_url);
|
||||
unset($tor['publisher-url.utf-8']);
|
||||
|
||||
// Add comment
|
||||
$comment = '';
|
||||
$orig_com = (@$tor['comment']) ? $tor['comment'] : '';
|
||||
if ($bb_cfg['bt_add_comment'])
|
||||
{
|
||||
$comment = $bb_cfg['bt_add_comment'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$comment = ($publisher_url) ? $publisher_url : '';
|
||||
}
|
||||
|
||||
if ($comment = trim($comment))
|
||||
{
|
||||
$tor['comment'] = strval($comment);
|
||||
unset($tor['comment.utf-8']);
|
||||
}
|
||||
|
||||
//Azureus DHT disable
|
||||
$tor['azureus_properties'] = array('dht_backup_enable' => intval(0));
|
||||
$tor['comment'] = strval($publisher_url);
|
||||
unset($tor['comment.utf-8']);
|
||||
|
||||
// Send torrent
|
||||
$output = bencode($tor);
|
||||
$filename = clean_filename(basename($attachment['real_filename']));
|
||||
$mimetype = 'application/x-bittorrent;';
|
||||
$charset = (strpos(USER_AGENT, 'pera') && @$lang['CONTENT_ENCODING']) ? "charset={$lang['CONTENT_ENCODING']};" : '';
|
||||
$dl_fname = ($bb_cfg['torrent_name_style'] ? '['.$bb_cfg['server_name'].'].t' . $topic_id . '.torrent' : clean_filename(basename($attachment['real_filename'])));
|
||||
|
||||
header("Content-Type: $mimetype $charset name=\"$filename\"");
|
||||
if ($bb_cfg['torrent_name_style'])
|
||||
if (!empty($_COOKIE['explain']))
|
||||
{
|
||||
$header_file_name = 'Content-Disposition: attachment; filename="['.$bb_cfg['server_name'].'].t' . $topic_id . '.torrent"';
|
||||
header($header_file_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Content-Disposition: attachment; filename=\"$filename\"");
|
||||
$out = "attach path: $filename<br /><br />";
|
||||
$tor['info']['pieces'] = '[...] '. strlen($tor['info']['pieces']) .' bytes';
|
||||
$out .= print_r($tor, true);
|
||||
bb_die("<pre>$out</pre>");
|
||||
}
|
||||
|
||||
header("Content-Type: application/x-bittorrent; name=\"$dl_fname\"");
|
||||
header("Content-Disposition: attachment; filename=\"$dl_fname\"");
|
||||
|
||||
bb_exit($output);
|
||||
}
|
||||
|
||||
|
@ -623,16 +520,16 @@ function generate_passkey ($user_id, $force_generate = false)
|
|||
$passkey_val = make_rand_str(BT_AUTH_KEY_LENGTH);
|
||||
|
||||
// Insert new row
|
||||
$sql = "INSERT IGNORE INTO ". BB_BT_USERS ." (user_id, auth_key) VALUES ($user_id, '$passkey_val')";
|
||||
DB()->query("INSERT IGNORE INTO ". BB_BT_USERS ." (user_id, auth_key) VALUES ($user_id, '$passkey_val')");
|
||||
|
||||
if (DB()->sql_query($sql) && DB()->affected_rows() == 1)
|
||||
if (DB()->affected_rows() == 1)
|
||||
{
|
||||
return $passkey_val;
|
||||
}
|
||||
// Update
|
||||
$sql = "UPDATE IGNORE ". BB_BT_USERS ." SET auth_key = '$passkey_val' WHERE user_id = $user_id LIMIT 1";
|
||||
DB()->query("UPDATE IGNORE ". BB_BT_USERS ." SET auth_key = '$passkey_val' WHERE user_id = $user_id LIMIT 1");
|
||||
|
||||
if (DB()->sql_query($sql) && DB()->affected_rows() == 1)
|
||||
if (DB()->affected_rows() == 1)
|
||||
{
|
||||
return $passkey_val;
|
||||
}
|
||||
|
@ -684,6 +581,7 @@ function torrent_error_exit ($message)
|
|||
global $reg_mode, $return_message, $lang;
|
||||
|
||||
$msg = '';
|
||||
|
||||
if (isset($reg_mode) && ($reg_mode == 'request' || $reg_mode == 'newtopic'))
|
||||
{
|
||||
if (isset($return_message))
|
||||
|
@ -692,9 +590,8 @@ function torrent_error_exit ($message)
|
|||
}
|
||||
$msg .= '<b>'. $lang['BT_REG_FAIL'] .'</b><br /><br />';
|
||||
}
|
||||
$msg .= $message;
|
||||
|
||||
bb_die($msg);
|
||||
bb_die($msg . $message);
|
||||
}
|
||||
|
||||
// bdecode: based on OpenTracker [http://whitsoftdev.com/opentracker]
|
||||
|
|
|
@ -81,10 +81,6 @@ $lang['BT_CHECK_ANNOUNCE_URL_EXPL'] = 'register on tracker only allowed urls';
|
|||
$lang['BT_REPLACE_ANN_URL'] = 'Replace announce url';
|
||||
$lang['BT_REPLACE_ANN_URL_EXPL'] = 'replace original announce url with your default in .torrent files';
|
||||
$lang['BT_DEL_ADDIT_ANN_URLS'] = 'Remove all additional announce urls';
|
||||
$lang['BT_ADD_COMMENT'] = 'Torrent comments';
|
||||
$lang['BT_ADD_COMMENT_EXPL'] = 'adds the Comments filed to the .torrent files (leave blank to use the topic URL as a comment)';
|
||||
$lang['BT_ADD_PUBLISHER'] = 'Torrent\'s publisher';
|
||||
$lang['BT_ADD_PUBLISHER_EXPL'] = 'adds the Publisher field and topic URL as the Publisher-url to the .torrent files (leave blank to disable)';
|
||||
|
||||
$lang['BT_SHOW_PEERS_HEAD'] = 'Peers-List';
|
||||
$lang['BT_SHOW_PEERS'] = 'Show peers (seeders and leechers)';
|
||||
|
@ -110,8 +106,6 @@ $lang['BT_SHOW_DL_BUT_CANCEL'] = $lang['DL_CANCEL'];
|
|||
|
||||
$lang['BT_ADD_AUTH_KEY_HEAD'] = 'Passkey';
|
||||
$lang['BT_ADD_AUTH_KEY'] = 'Enable adding passkey to the torrent-files before downloading';
|
||||
$lang['BT_GEN_PASSKEY_ON_REG'] = 'Automatically generate passkey';
|
||||
$lang['BT_GEN_PASSKEY_ON_REG_EXPL'] = "generate passkey during first downloading attempt if current user's passkey is empty";
|
||||
|
||||
$lang['BT_TOR_BROWSE_ONLY_REG_HEAD'] = 'Torrent browser (tracker)';
|
||||
$lang['BT_TOR_BROWSE_ONLY_REG'] = 'Torrent browser (tracker.php) accessible only for logged in users';
|
||||
|
|
|
@ -82,10 +82,6 @@ $lang['BT_REPLACE_ANN_URL'] = 'Заменять announce url';
|
|||
$lang['BT_REPLACE_ANN_URL_EXPL'] = 'заменять оригинальный announce url в .torrent файлах на ваш';
|
||||
$lang['BT_DEL_ADDIT_ANN_URLS'] = 'Удалять все дополнительные announce urls';
|
||||
$lang['BT_DEL_ADDIT_ANN_URLS_EXPL'] = 'если торрент содержит адреса других трекеров, они будут удалены';
|
||||
$lang['BT_ADD_COMMENT'] = 'Добавлять в торрент комментарий';
|
||||
$lang['BT_ADD_COMMENT_EXPL'] = 'оставьте пустым для добавления адреса топика в качестве комментария';
|
||||
$lang['BT_ADD_PUBLISHER'] = 'Добавлять адрес топика как publisher-url и это имя в качестве имени publisher';
|
||||
$lang['BT_ADD_PUBLISHER_EXPL'] = 'для отключения - оставьте пустым';
|
||||
|
||||
$lang['BT_SHOW_PEERS_HEAD'] = 'Peers-List';
|
||||
$lang['BT_SHOW_PEERS'] = 'Показывать список источников (seeders/leechers)';
|
||||
|
@ -111,8 +107,6 @@ $lang['BT_SHOW_DL_BUT_CANCEL'] = $lang['DL_CANCEL'];
|
|||
|
||||
$lang['BT_ADD_AUTH_KEY_HEAD'] = 'Passkey';
|
||||
$lang['BT_ADD_AUTH_KEY'] = 'Aвтодобавление passkey к торрент-файлам перед их скачиванием';
|
||||
$lang['BT_GEN_PASSKEY_ON_REG'] = 'Автоматически генерировать passkey';
|
||||
$lang['BT_GEN_PASSKEY_ON_REG_EXPL'] = 'если passkey не найден, генерировать его при первом скачивании торрента';
|
||||
|
||||
$lang['BT_TOR_BROWSE_ONLY_REG_HEAD'] = 'Torrent browser (трекер)';
|
||||
$lang['BT_TOR_BROWSE_ONLY_REG'] = 'Torrent browser (tracker.php) не доступен для гостей';
|
||||
|
|
|
@ -53,14 +53,6 @@
|
|||
<td><h4>{L_BT_DEL_ADDIT_ANN_URLS}</h4><h6>{L_BT_DEL_ADDIT_ANN_URLS_EXPL}</h6></td>
|
||||
<td><label for="bt_del_addit_ann_urls1"><input type="radio" name="bt_del_addit_ann_urls" id="bt_del_addit_ann_urls1" value="1" {BT_DEL_ADDIT_ANN_URLS_YES} /> {L_BT_DEL_ADDIT_ANN_URLS_YES} </label><label for="bt_del_addit_ann_urls2"> <input type="radio" name="bt_del_addit_ann_urls" id="bt_del_addit_ann_urls2" value="0" {BT_DEL_ADDIT_ANN_URLS_NO} /> {L_BT_DEL_ADDIT_ANN_URLS_NO} </label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>{L_BT_ADD_COMMENT}</h4><h6>{L_BT_ADD_COMMENT_EXPL}</h6></td>
|
||||
<td><input class="post" type="text" size="30" maxlength="255" name="bt_add_comment" value="{BT_ADD_COMMENT}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>{L_BT_ADD_PUBLISHER}</h4><h6>{L_BT_ADD_PUBLISHER_EXPL}</h6></td>
|
||||
<td><input class="post" type="text" size="30" maxlength="255" name="bt_add_publisher" value="{BT_ADD_PUBLISHER}" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">{L_BT_SHOW_PEERS_HEAD}</th>
|
||||
|
@ -147,10 +139,6 @@
|
|||
<td><h4>{L_BT_ADD_AUTH_KEY}</h4></td>
|
||||
<td><label for="bt_add_auth_key1"><input type="radio" name="bt_add_auth_key" id="bt_add_auth_key1" value="1" {BT_ADD_AUTH_KEY_YES} /> {L_BT_ADD_AUTH_KEY_YES} </label><label for="bt_add_auth_key2"> <input type="radio" name="bt_add_auth_key" id="bt_add_auth_key2" value="0" {BT_ADD_AUTH_KEY_NO} /> {L_BT_ADD_AUTH_KEY_NO} </label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>{L_BT_GEN_PASSKEY_ON_REG}</h4><h6>{L_BT_GEN_PASSKEY_ON_REG_EXPL}</h6></td>
|
||||
<td><label for="bt_gen_passkey_on_reg1"><input type="radio" name="bt_gen_passkey_on_reg" id="bt_gen_passkey_on_reg1" value="1" {BT_GEN_PASSKEY_ON_REG_YES} /> {L_BT_GEN_PASSKEY_ON_REG_YES} </label><label for="bt_gen_passkey_on_reg2"> <input type="radio" name="bt_gen_passkey_on_reg" id="bt_gen_passkey_on_reg2" value="0" {BT_GEN_PASSKEY_ON_REG_NO} /> {L_BT_GEN_PASSKEY_ON_REG_NO} </label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">{L_BT_TOR_BROWSE_ONLY_REG_HEAD}</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue