From ed967afc95571c7017eb63d8f71f7e066306aedb Mon Sep 17 00:00:00 2001 From: nanosimbiot Date: Mon, 15 Aug 2011 01:18:50 +0000 Subject: [PATCH] r210 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit автоподнятие темы при обновлении торрента git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@210 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/config.php | 3 ++- upload/includes/functions_torrent.php | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/upload/config.php b/upload/config.php index a67b57699..fddf71812 100644 --- a/upload/config.php +++ b/upload/config.php @@ -159,7 +159,8 @@ $tr_cfg = array( 'leech_expire_factor' => 60, 'limit_concurrent_ips' => false, 'limit_seed_ips' => 0, - 'limit_leech_ips' => 2, + 'limit_leech_ips' => 0, + 'tor_topic_up' => true, ); $bb_cfg['show_dl_status_in_search'] = true; diff --git a/upload/includes/functions_torrent.php b/upload/includes/functions_torrent.php index e89bbd4ab..b488f74b1 100644 --- a/upload/includes/functions_torrent.php +++ b/upload/includes/functions_torrent.php @@ -256,7 +256,7 @@ function change_tor_type ($attach_id, $tor_status_gold) function tracker_register ($attach_id, $mode = '') { global $template, $attach_config, $bb_cfg, $lang, $return_message; - global $reg_mode; + global $reg_mode, $tr_cfg; $attach_id = intval($attach_id); $reg_mode = $mode; @@ -427,6 +427,11 @@ function tracker_register ($attach_id, $mode = '') } } + if($tr_cfg['tor_topic_up']) + { + DB()->query("UPDATE ". BB_TOPICS ." SET topic_last_post_time = GREATEST(topic_last_post_time, ". (TIMENOW - 3*86400) .") WHERE topic_id = $topic_id LIMIT 1"); + } + if ($reg_mode == 'request' || $reg_mode == 'newtopic') { $mess = sprintf($lang['BT_REGISTERED'], append_sid("download.php?id=$attach_id"));