diff --git a/admin/admin_mass_email.php b/admin/admin_mass_email.php
index 5d0bcfdaf..58c376560 100644
--- a/admin/admin_mass_email.php
+++ b/admin/admin_mass_email.php
@@ -75,10 +75,7 @@ if (isset($_POST['submit'])) {
$emailer->set_reply($reply_to);
$emailer->set_template('admin_send_email');
- $emailer->assign_vars([
- 'SUBJECT' => html_entity_decode($subject),
- 'MESSAGE' => html_entity_decode($message)
- ]);
+ $emailer->assign_vars(['MESSAGE' => trim(html_entity_decode($message))]);
$emailer->send($message_type);
}
diff --git a/bt/announce.php b/bt/announce.php
index 48401fabc..a17957531 100644
--- a/bt/announce.php
+++ b/bt/announce.php
@@ -126,6 +126,7 @@ $ip_sql = \TorrentPier\Helpers\IPHelper::ip2long($ip);
// Peer unique id
$peer_hash = hash('xxh128', rtrim($info_hash, ' ') . $passkey . $ip . $port);
+
// Events
$stopped = ($event === 'stopped');
@@ -425,8 +426,10 @@ if (!$output) {
$peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
}
+
$output['external ip'] = inet_pton($ip);
$output['warning message'] = 'Statistics were updated';
+
// Return data to client
echo \Arokettu\Bencode\Bencode::encode($output);
diff --git a/library/includes/functions.php b/library/includes/functions.php
index caf7a9d9f..4cf2f51d5 100644
--- a/library/includes/functions.php
+++ b/library/includes/functions.php
@@ -1232,7 +1232,7 @@ function get_user_torrent_client(string $peer_id): mixed
}
if (!empty($bestMatch)) {
- return '
';
+ return '
';
} else {
return $peer_id;
}
diff --git a/library/includes/ucp/email.php b/library/includes/ucp/email.php
index c5e4f16df..d125307a2 100644
--- a/library/includes/ucp/email.php
+++ b/library/includes/ucp/email.php
@@ -40,7 +40,6 @@ if ($row = DB()->fetch_row($sql)) {
$user_email = $row['user_email'];
$user_lang = $row['user_lang'];
-
if (isset($_POST['submit'])) {
$subject = trim(html_entity_decode($_POST['subject']));
$message = trim(html_entity_decode($_POST['message']));
diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php
index f5ada61f5..26de16022 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' => true,
+ 'user_lang' => $bb_cfg['allow_change']['language'],
'user_opt' => true
];
@@ -102,7 +102,7 @@ switch ($mode) {
'username' => IS_ADMIN || $bb_cfg['allow_namechange'],
'user_password' => true,
'user_email' => true, // должен быть после user_password
- 'user_lang' => true,
+ 'user_lang' => $bb_cfg['allow_change']['language'],
'user_gender' => $bb_cfg['gender'],
'user_birthday' => $bb_cfg['birthday_enabled'],
'user_timezone' => true,