diff --git a/library/includes/cron/jobs/tr_cleanup_and_dlstat.php b/library/includes/cron/jobs/tr_cleanup_and_dlstat.php
index 3b4283054..d27e11905 100644
--- a/library/includes/cron/jobs/tr_cleanup_and_dlstat.php
+++ b/library/includes/cron/jobs/tr_cleanup_and_dlstat.php
@@ -93,21 +93,25 @@ if ($tr_cfg['update_dlstat'])
");
// Update TOTAL user's dlstat
- DB()->query("
- UPDATE
- ". BB_BT_USERS ." u,
- ". NEW_BB_BT_LAST_USERSTAT ." ub
- SET
- u.u_up_total = u.u_up_total + ub.up_add,
- u.u_down_total = u.u_down_total + ub.down_add,
- u.u_up_release = u.u_up_release + ub.release_add,
- u.u_up_bonus = u.u_up_bonus + ub.bonus_add,
- u.up_today = u.up_today + ub.up_add,
- u.down_today = u.down_today + ub.down_add,
- u.up_release_today = u.up_release_today + ub.release_add,
- u.up_bonus_today = u.up_bonus_today + ub.bonus_add
- WHERE u.user_id = ub.user_id
- ");
+ // This is not needed if Ocelot enabled. It's important.
+ if (!$bb_cfg['ocelot']['enabled'])
+ {
+ DB()->query("
+ UPDATE
+ ". BB_BT_USERS ." u,
+ ". NEW_BB_BT_LAST_USERSTAT ." ub
+ SET
+ u.u_up_total = u.u_up_total + ub.up_add,
+ u.u_down_total = u.u_down_total + ub.down_add,
+ u.u_up_release = u.u_up_release + ub.release_add,
+ u.u_up_bonus = u.u_up_bonus + ub.bonus_add,
+ u.up_today = u.up_today + ub.up_add,
+ u.down_today = u.down_today + ub.down_add,
+ u.up_release_today = u.up_release_today + ub.release_add,
+ u.up_bonus_today = u.up_bonus_today + ub.bonus_add
+ WHERE u.user_id = ub.user_id
+ ");
+ }
// Delete from dl_list what exists in BUF but not exsits in NEW
DB()->query("
diff --git a/library/includes/functions.php b/library/includes/functions.php
index 72f7be5c8..c67542dfa 100644
--- a/library/includes/functions.php
+++ b/library/includes/functions.php
@@ -2341,10 +2341,18 @@ function pad_with_space ($str)
function create_magnet ($infohash, $auth_key, $logged_in)
{
- global $bb_cfg, $_GET, $userdata, $images;
+ global $bb_cfg, $_GET, $images;
$passkey_url = ((!$logged_in || isset($_GET['no_passkey'])) && $bb_cfg['bt_tor_browse_only_reg']) ? '' : "?{$bb_cfg['passkey_key']}=$auth_key";
- return '
';
+
+ if ($bb_cfg['ocelot']['enabled'])
+ {
+ return '
';
+ }
+ else
+ {
+ return '
';
+ }
}
function set_die_append_msg ($forum_id = null, $topic_id = null, $group_id = null)