Disable DC++ magnets

Отключение магнитов для хабов при отключении магнитов в целом.
This commit is contained in:
Exile 2014-08-19 14:33:27 +04:00
commit dd26eda857

View file

@ -156,10 +156,15 @@ class torrent
function build_file_item ($name, $length) function build_file_item ($name, $length)
{ {
global $images, $lang; global $bb_cfg, $images, $lang;
$magnet_name = '<a title="'.$lang['DC_MAGNET'].'" href="dchub:magnet:?kt='.$name.'&xl='.$length.'"><img src="'. $images['icon_dc_magnet'] .'" width="10" height="10" border="0" /></a>'; $magnet_name = $magnet_ext = '';
$magnet_ext = '<a title="'.$lang['DC_MAGNET_EXT'].'" href="dchub:magnet:?kt=.'.substr(strrchr($name, '.'), 1).'&xl='.$length.'"><img src="'. $images['icon_dc_magnet_ext'] .'" width="10" height="10" border="0" /></a>';
if ($bb_cfg['magnet_links_enabled'])
{
$magnet_name = '<a title="'.$lang['DC_MAGNET'].'" href="dchub:magnet:?kt='.$name.'&xl='.$length.'"><img src="'. $images['icon_dc_magnet'] .'" width="10" height="10" border="0" /></a>';
$magnet_ext = '<a title="'.$lang['DC_MAGNET_EXT'].'" href="dchub:magnet:?kt=.'.substr(strrchr($name, '.'), 1).'&xl='.$length.'"><img src="'. $images['icon_dc_magnet_ext'] .'" width="10" height="10" border="0" /></a>';
}
return "$name <i>$length</i> $magnet_name $magnet_ext"; return "$name <i>$length</i> $magnet_name $magnet_ext";
} }