This commit is contained in:
Roman Kelesidis 2024-01-27 20:19:40 +07:00
parent a1df0763db
commit ac725ce56f
4 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ date_default_timezone_set('UTC');
$allowed_cdn = array('HTTP_X_FORWARDED_FOR', 'HTTP_FASTLY_CLIENT_IP', 'HTTP_CF_CONNECTING_IP');
foreach ($allowed_cdn as $cdn)
{
if (isset($_SERVER[$cdn]) && filter_var($_SERVER[$cdn], FILTER_VALIDATE_IP))
if (isset($_SERVER[$cdn]) && filter_var($_SERVER[$cdn], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER[$cdn];
}

View File

@ -236,7 +236,7 @@ if ($tor_reged && $tor_info)
'DOWNLOAD_COUNT' => declension((int)$download_count, 'times'),
'REGED_TIME' => bb_date($tor_info['reg_time']),
'REGED_DELTA' => delta_time($tor_info['reg_time']),
'TORRENT_SIZE' => humn_size($tor_size),
'TORRENT_SIZE' => humn_size($tor_size, 2),
'COMPLETED' => $show_completed_count ? declension((int)$tor_info['complete_count'], 'times') : false,
));
@ -252,7 +252,7 @@ if ($tor_reged && $tor_info)
'SHOW_DL_LIST' => true,
'SHOW_DL_LIST_TOR_INFO' => true,
'TOR_SIZE' => humn_size($tor_size),
'TOR_SIZE' => humn_size($tor_size, 1),
'TOR_LONGEVITY' => delta_time($tor_info['reg_time']),
'TOR_COMPLETED' => $show_completed_count ? declension((int)$tor_info['complete_count'], 'times') : false,
'TOR_DOWNLOAD_COUNT' => declension((int)$download_count, 'times'),

View File

@ -831,7 +831,7 @@ if ($allowed_forums)
'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor['tor_status']],
'TOR_SIZE_RAW' => $size,
'TOR_SIZE' => humn_size($size),
'TOR_SIZE' => humn_size($size, 1),
'UL_SPEED' => $ul_sp,
'DL_SPEED' => $dl_sp,
'SEEDS' => ($seeds) ? $seeds : 0,

View File

@ -521,7 +521,7 @@ foreach ($topic_rowset as $topic)
$template->assign_block_vars('t.tor', array(
'SEEDERS' => (int) $topic['seeders'],
'LEECHERS' => (int) $topic['leechers'],
'TOR_SIZE' => humn_size($topic['tor_size']),
'TOR_SIZE' => humn_size($topic['tor_size'], 1),
'COMPL_CNT' => $show_completed_count ? (int) $topic['complete_count'] : (int) $topic['download_count'],
'SHOW_COMPL' => (bool) $show_completed_count,
'ATTACH_ID' => $topic['attach_id'],