mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
e8e8ae6a73
commit
57cd76df63
4
ajax.php
4
ajax.php
@ -214,7 +214,7 @@ class ajax_common
|
||||
function ajax_die($error_msg, $error_code = E_AJAX_GENERAL_ERROR)
|
||||
{
|
||||
$this->response['error_code'] = $error_code;
|
||||
$this->response['error_msg'] = strip_tags(preg_replace('#<br\s*/?>#i', "\n", $error_msg));
|
||||
$this->response['error_msg'] = strip_tags(br2nl($error_msg));
|
||||
|
||||
// Get caller info
|
||||
if (!empty($_COOKIE['explain']))
|
||||
@ -323,7 +323,7 @@ class ajax_common
|
||||
if (empty($confirm_msg)) $this->ajax_die('false');
|
||||
|
||||
$this->response['prompt_confirm'] = 1;
|
||||
$this->response['confirm_msg'] = strip_tags(preg_replace('#<br\s*/?>#i', "\n", $confirm_msg));
|
||||
$this->response['confirm_msg'] = strip_tags(br2nl($confirm_msg));
|
||||
$this->send();
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ if ($tor_reged && $tor_info)
|
||||
|
||||
// Magnet link
|
||||
$passkey = DB()->fetch_row("SELECT auth_key FROM ". BB_BT_USERS ." WHERE user_id = ". (int) $bt_user_id ." LIMIT 1");
|
||||
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key'], html_entity_decode($t_data['topic_title'], ENT_QUOTES, 'UTF-8'));
|
||||
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key'], html_ent_decode($t_data['topic_title']));
|
||||
|
||||
// ratio limits
|
||||
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];
|
||||
|
@ -421,6 +421,11 @@ function htmlCHR ($txt, $double_encode = false, $quote_style = ENT_QUOTES, $char
|
||||
return (string) htmlspecialchars($txt, $quote_style, $charset, $double_encode);
|
||||
}
|
||||
|
||||
function br2nl ($txt)
|
||||
{
|
||||
return preg_replace('#<br\s*/?>#i', "\n", $txt);
|
||||
}
|
||||
|
||||
function html_ent_decode ($txt, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
|
||||
{
|
||||
return (string) html_entity_decode($txt, $quote_style, $charset);
|
||||
|
@ -787,7 +787,7 @@ if ($allowed_forums)
|
||||
$s_last = $tor['seeder_last_seen'];
|
||||
$att_id = $tor['attach_id'];
|
||||
$size = $tor['size'];
|
||||
$tor_magnet = create_magnet($tor['info_hash'], $passkey['auth_key'], html_entity_decode($tor['topic_title'], ENT_QUOTES, 'UTF-8'));
|
||||
$tor_magnet = create_magnet($tor['info_hash'], $passkey['auth_key'], html_ent_decode($tor['topic_title']));
|
||||
$compl = $tor['complete_count'];
|
||||
$dl_sp = ($dl) ? humn_size($dl, 0, 'KB') .'/s' : '0 KB/s';
|
||||
$ul_sp = ($ul) ? humn_size($ul, 0, 'KB') .'/s' : '0 KB/s';
|
||||
|
@ -512,7 +512,7 @@ foreach ($topic_rowset as $topic)
|
||||
|
||||
if (isset($topic['tor_size']))
|
||||
{
|
||||
$tor_magnet = create_magnet($topic['info_hash'], $topic['auth_key'], html_entity_decode($topic['topic_title'], ENT_QUOTES, 'UTF-8'));
|
||||
$tor_magnet = create_magnet($topic['info_hash'], $topic['auth_key'], html_ent_decode($topic['topic_title']));
|
||||
|
||||
$template->assign_block_vars('t.tor', array(
|
||||
'SEEDERS' => (int) $topic['seeders'],
|
||||
|
Loading…
Reference in New Issue
Block a user