From acda8be43cc47a80d9eef3be14273fd81bd07e94 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 26 Oct 2023 15:00:53 +0700 Subject: [PATCH] Use lang variable $lang['BT_REG_FAIL'] instead of text (#989) --- library/includes/ucp/register.php | 2 +- src/Legacy/Torrent.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index 26de16022..eedc71558 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -72,7 +72,7 @@ switch ($mode) { 'user_password' => true, 'user_email' => true, 'user_timezone' => true, - 'user_lang' => $bb_cfg['allow_change']['language'], + 'user_lang' => true, 'user_opt' => true ]; diff --git a/src/Legacy/Torrent.php b/src/Legacy/Torrent.php index 388817a3f..c994a20e3 100644 --- a/src/Legacy/Torrent.php +++ b/src/Legacy/Torrent.php @@ -424,12 +424,11 @@ class Torrent if (!DB()->sql_query($sql)) { $sql_error = DB()->sql_error(); + // Duplicate entry if ($sql_error['code'] == 1062) { - // Duplicate entry - self::torrent_error_exit($lang['BT_REG_FAIL_SAME_HASH']); } - bb_die('Could not register torrent on tracker'); + bb_die($lang['BT_REG_FAIL']); } // update tracker status for this attachment