mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#988)
This commit is contained in:
parent
d45e9e2473
commit
8fa4758ebe
5 changed files with 7 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -1232,7 +1232,7 @@ function get_user_torrent_client(string $peer_id): mixed
|
|||
}
|
||||
|
||||
if (!empty($bestMatch)) {
|
||||
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/'. $bestMatch .'.png" alt="' . $bestMatch . '" title="' . $peer_id . '">';
|
||||
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/' . $bestMatch . '.png" alt="' . $bestMatch . '" title="' . $peer_id . '">';
|
||||
} else {
|
||||
return $peer_id;
|
||||
}
|
||||
|
|
|
@ -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']));
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue