From c476cf3799c38d890d083df2d8235ba1cce8c144 Mon Sep 17 00:00:00 2001 From: "pherum83@gmail.com" Date: Tue, 28 Jan 2014 21:32:56 +0000 Subject: [PATCH] r572 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Переменные, необходимые для корректной обработки данных git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@572 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/config.php | 4 ++-- upload/includes/cron/jobs/avatars_cleanup.php | 2 -- upload/includes/cron/jobs/bb_maintenance.php | 2 -- upload/includes/cron/jobs/cache_gc.php | 2 -- upload/includes/cron/jobs/clean_dlstat.php | 2 -- upload/includes/cron/jobs/clean_log.php | 2 -- upload/includes/cron/jobs/db_backup.php | 2 -- upload/includes/cron/jobs/prune_forums.php | 2 -- upload/includes/cron/jobs/prune_inactive_users.php | 2 -- upload/includes/cron/jobs/prune_topic_moved.php | 2 -- upload/includes/cron/jobs/sessions_cleanup.php | 2 -- upload/includes/cron/jobs/site_backup.php | 2 -- upload/includes/cron/jobs/tr_cleanup_and_dlstat.php | 2 -- upload/includes/cron/jobs/tr_maintenance.php | 2 -- upload/includes/cron/jobs/tr_make_snapshot.php | 2 -- upload/includes/functions_admin_cron.php | 4 ++-- upload/includes/functions_torrent.php | 2 +- 17 files changed, 5 insertions(+), 33 deletions(-) diff --git a/upload/config.php b/upload/config.php index b5f1105a1..256ee2b83 100644 --- a/upload/config.php +++ b/upload/config.php @@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.5 (unstable)'; -$bb_cfg['tp_release_date'] = '28-01-2014'; -$bb_cfg['tp_release_state'] = 'R571'; +$bb_cfg['tp_release_date'] = '29-01-2014'; +$bb_cfg['tp_release_state'] = 'R572'; // Database $charset = 'utf8'; diff --git a/upload/includes/cron/jobs/avatars_cleanup.php b/upload/includes/cron/jobs/avatars_cleanup.php index 059300283..3b7cfbed1 100644 --- a/upload/includes/cron/jobs/avatars_cleanup.php +++ b/upload/includes/cron/jobs/avatars_cleanup.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $fix_errors = true; $debug_mode = false; diff --git a/upload/includes/cron/jobs/bb_maintenance.php b/upload/includes/cron/jobs/bb_maintenance.php index f97510a8b..9936447b6 100644 --- a/upload/includes/cron/jobs/bb_maintenance.php +++ b/upload/includes/cron/jobs/bb_maintenance.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $fix_errors = true; $debug_mode = false; diff --git a/upload/includes/cron/jobs/cache_gc.php b/upload/includes/cron/jobs/cache_gc.php index d83822d53..4aebb9826 100644 --- a/upload/includes/cron/jobs/cache_gc.php +++ b/upload/includes/cron/jobs/cache_gc.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $gc_cache = array( 'tr_cache', 'bb_cache', diff --git a/upload/includes/cron/jobs/clean_dlstat.php b/upload/includes/cron/jobs/clean_dlstat.php index 7c1c99a8e..994da7c3b 100644 --- a/upload/includes/cron/jobs/clean_dlstat.php +++ b/upload/includes/cron/jobs/clean_dlstat.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - define('BUF_DLSTATUS_TABLE', 'tmp_buf_dlstatus'); // Move new dl-status records to main table diff --git a/upload/includes/cron/jobs/clean_log.php b/upload/includes/cron/jobs/clean_log.php index c0c5be0c7..9fb3455e0 100644 --- a/upload/includes/cron/jobs/clean_log.php +++ b/upload/includes/cron/jobs/clean_log.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $log_days_keep = (int) $bb_cfg['log_days_keep']; DB()->query(" diff --git a/upload/includes/cron/jobs/db_backup.php b/upload/includes/cron/jobs/db_backup.php index a7d36a77d..3efbfa8c2 100644 --- a/upload/includes/cron/jobs/db_backup.php +++ b/upload/includes/cron/jobs/db_backup.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - sleep(15); $exec_output = array(); diff --git a/upload/includes/cron/jobs/prune_forums.php b/upload/includes/cron/jobs/prune_forums.php index 81d7ec13e..303b7ff4a 100644 --- a/upload/includes/cron/jobs/prune_forums.php +++ b/upload/includes/cron/jobs/prune_forums.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - require_once(INC_DIR .'functions_admin.php'); if ($bb_cfg['prune_enable']) diff --git a/upload/includes/cron/jobs/prune_inactive_users.php b/upload/includes/cron/jobs/prune_inactive_users.php index 17ae5def8..bbf9b1964 100644 --- a/upload/includes/cron/jobs/prune_inactive_users.php +++ b/upload/includes/cron/jobs/prune_inactive_users.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $users_per_cycle = 1000; require_once(INC_DIR .'functions_admin.php'); diff --git a/upload/includes/cron/jobs/prune_topic_moved.php b/upload/includes/cron/jobs/prune_topic_moved.php index 0670c20db..4624718a2 100644 --- a/upload/includes/cron/jobs/prune_topic_moved.php +++ b/upload/includes/cron/jobs/prune_topic_moved.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - if ($bb_cfg['topic_moved_days_keep']) { $prune_time = TIMENOW - 86400*$bb_cfg['topic_moved_days_keep']; diff --git a/upload/includes/cron/jobs/sessions_cleanup.php b/upload/includes/cron/jobs/sessions_cleanup.php index 26f88af89..81ea0c841 100644 --- a/upload/includes/cron/jobs/sessions_cleanup.php +++ b/upload/includes/cron/jobs/sessions_cleanup.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $user_session_expire_time = TIMENOW - intval($bb_cfg['user_session_duration']); $admin_session_expire_time = TIMENOW - intval($bb_cfg['admin_session_duration']); diff --git a/upload/includes/cron/jobs/site_backup.php b/upload/includes/cron/jobs/site_backup.php index 0564dfb1c..54da83fad 100644 --- a/upload/includes/cron/jobs/site_backup.php +++ b/upload/includes/cron/jobs/site_backup.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - $exec_output = array(); $exec_return_status = 0; diff --git a/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php b/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php index 80a518fde..9f905f68f 100644 --- a/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php +++ b/upload/includes/cron/jobs/tr_cleanup_and_dlstat.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg, $tr_cfg; - $releaser = DL_STATUS_RELEASER; define('NEW_BB_BT_LAST_TORSTAT', 'new_bt_last_torstat'); diff --git a/upload/includes/cron/jobs/tr_maintenance.php b/upload/includes/cron/jobs/tr_maintenance.php index 1fdea42b3..b51fa8359 100644 --- a/upload/includes/cron/jobs/tr_maintenance.php +++ b/upload/includes/cron/jobs/tr_maintenance.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - if (empty($bb_cfg['seeder_last_seen_days_keep']) || empty($bb_cfg['seeder_never_seen_days_keep'])) { return; diff --git a/upload/includes/cron/jobs/tr_make_snapshot.php b/upload/includes/cron/jobs/tr_make_snapshot.php index e2be07578..83fdbd1dc 100644 --- a/upload/includes/cron/jobs/tr_make_snapshot.php +++ b/upload/includes/cron/jobs/tr_make_snapshot.php @@ -2,8 +2,6 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -global $bb_cfg; - DB()->expect_slow_query(600); // diff --git a/upload/includes/functions_admin_cron.php b/upload/includes/functions_admin_cron.php index 6b8b93cb5..3b58c200a 100644 --- a/upload/includes/functions_admin_cron.php +++ b/upload/includes/functions_admin_cron.php @@ -2,7 +2,7 @@ function run_jobs($jobs) { - global $datastore; + global $bb_cfg, $tr_cfg, $datastore; define('IN_CRON', true); @@ -17,7 +17,7 @@ function run_jobs($jobs) while ($row = DB()->sql_fetchrow($result)) { $job = $row['cron_script']; - $job_script = BB_ROOT . 'includes/cron/jobs/' . $job; + $job_script = INC_DIR . 'cron/jobs/' . $job; require($job_script); } DB()->query(" diff --git a/upload/includes/functions_torrent.php b/upload/includes/functions_torrent.php index cc919c1e2..b26faf6d6 100644 --- a/upload/includes/functions_torrent.php +++ b/upload/includes/functions_torrent.php @@ -198,7 +198,7 @@ function change_tor_status ($attach_id, $new_tor_status) // Set gold/silver type for torrent function change_tor_type ($attach_id, $tor_status_gold) { - global $topic_id, $lang; + global $topic_id, $lang, $bb_cfg; if (!$torrent = get_torrent_info($attach_id)) {