diff --git a/upload/config.php b/upload/config.php
index 3e8062c5c..0166e4a64 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -56,7 +56,7 @@ $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'] = '09-08-2013';
-$bb_cfg['tp_release_state'] = 'R542';
+$bb_cfg['tp_release_state'] = 'R543';
// Database
$charset = 'utf8';
diff --git a/upload/includes/functions.php b/upload/includes/functions.php
index 6bb2a8203..eb16769dd 100644
--- a/upload/includes/functions.php
+++ b/upload/includes/functions.php
@@ -2670,36 +2670,46 @@ function pad_with_space ($str)
function create_magnet($infohash, $auth_key, $logged_in)
{
- 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 '
';
+ global $bb_cfg, $_GET, $userdata, $images;
+
+ if ($bb_cfg['announce_type'] == 'xbt')
+ {
+ $passkey = substr('00000000'. dechex($userdata['user_id']), -8) . substr(sha1($bb_cfg['torrent_pass_private_key'] .' '. $auth_key .' '. $userdata['user_id'] .' '. $infohash), 0, 24);
+ $announce = $bb_cfg['announce_xbt'] .'/'. $passkey .'/announce';
+ return '
';
+ }
+ else
+ {
+ $passkey_url = ((!$logged_in || isset($_GET['no_passkey'])) && $bb_cfg['bt_tor_browse_only_reg']) ? '' : "?{$bb_cfg['passkey_key']}=$auth_key";
+ return '
';
+ }
}
function get_avatar ($avatar, $type, $allow_avatar = true, $height = '', $width = '')
{
- global $bb_cfg;
+ global $bb_cfg;
- $height = ($height != '') ? 'height="'. $height .'"' : '';
- $width = ($width != '') ? 'width="'. $width .'"' : '';
+ $height = ($height != '') ? 'height="'. $height .'"' : '';
+ $width = ($width != '') ? 'width="'. $width .'"' : '';
- $user_avatar = '
';
+ $user_avatar = '
';
- if ($allow_avatar)
- {
- switch($type)
- {
- case USER_AVATAR_UPLOAD:
- $user_avatar = ( $bb_cfg['allow_avatar_upload'] ) ? '
' : '';
- break;
- case USER_AVATAR_REMOTE:
- $user_avatar = ( $bb_cfg['allow_avatar_remote'] ) ? '
' : '';
- break;
- case USER_AVATAR_GALLERY:
- $user_avatar = ( $bb_cfg['allow_avatar_local'] ) ? '
' : '';
- break;
- }
- }
- return $user_avatar;
+ if ($allow_avatar)
+ {
+ switch($type)
+ {
+ case USER_AVATAR_UPLOAD:
+ $user_avatar = ( $bb_cfg['allow_avatar_upload'] ) ? '
' : '';
+ break;
+ case USER_AVATAR_REMOTE:
+ $user_avatar = ( $bb_cfg['allow_avatar_remote'] ) ? '
' : '';
+ break;
+ case USER_AVATAR_GALLERY:
+ $user_avatar = ( $bb_cfg['allow_avatar_local'] ) ? '
' : '';
+ break;
+ }
+ }
+ return $user_avatar;
}
function set_die_append_msg ($forum_id = null, $topic_id = null)