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
a1df0763db
commit
ac725ce56f
@ -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];
|
||||
}
|
||||
|
@ -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'),
|
||||
|
@ -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,
|
||||
|
@ -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'],
|
||||
|
Loading…
Reference in New Issue
Block a user