Bustra, непомогло, вот еще раз весь код функции, все парвильно?
function change_tor_status ($attach_id, $new_tor_status)
{
global $topic_id, $userdata, $lang, $bb_cfg;
$attach_id = (int) $attach_id;
$new_tor_status = (int) $new_tor_status;
if (!$torrent =...