diff --git a/CHANGELOG.md b/CHANGELOG.md index f207194c4..8286b4b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ - Fixed Undefined variable $wordCensor [\#1400](https://github.com/torrentpier/torrentpier/pull/1400) ([belomaxorka](https://github.com/belomaxorka)) - Improved word censor 🤐 [\#1393](https://github.com/torrentpier/torrentpier/pull/1393) ([belomaxorka](https://github.com/belomaxorka)) - Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410), [\#1411](https://github.com/torrentpier/torrentpier/pull/1411) ([belomaxorka](https://github.com/belomaxorka)) - Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392), [\#1402](https://github.com/torrentpier/torrentpier/pull/1402), [\#1403](https://github.com/torrentpier/torrentpier/pull/1403) ([Exileum](https://github.com/Exileum)) diff --git a/library/ajax/edit_user_profile.php b/library/ajax/edit_user_profile.php index a707fd24c..657ffc5d8 100644 --- a/library/ajax/edit_user_profile.php +++ b/library/ajax/edit_user_profile.php @@ -130,9 +130,9 @@ switch ($field) { } $table = BB_BT_USERS; - $value = (float)str_replace(',', '.', $this->request['value']); + $value = (int)$this->request['value']; - if ($value < 0.0) { + if ($value < 0) { $this->ajax_die($lang['WRONG_INPUT']); } @@ -142,8 +142,7 @@ switch ($field) { break; } } - $value = sprintf('%.0f', $value); - $this->response['new_value'] = humn_size($value, null, null, ' '); + $this->response['new_value'] = humn_size($value, space: ' '); $btu = get_bt_userdata($user_id); $btu[$field] = $value; diff --git a/library/includes/functions.php b/library/includes/functions.php index 78f1e1de7..02759d723 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -2177,9 +2177,10 @@ function send_pm($user_id, $subject, $message, $poster_id = BOT_UID) * * @param array $data * @param bool $target_blank + * @param bool $no_link * @return string */ -function profile_url(array $data, bool $target_blank = false): string +function profile_url(array $data, bool $target_blank = false, bool $no_link = false): string { global $bb_cfg, $lang, $datastore; @@ -2210,13 +2211,13 @@ function profile_url(array $data, bool $target_blank = false): string } $profile = '' . $username . ''; - if (!in_array($user_id, explode(',', EXCLUDED_USERS))) { + if (!in_array($user_id, explode(',', EXCLUDED_USERS)) && !$no_link) { $target_blank = $target_blank ? ' target="_blank" ' : ''; $profile = '' . $profile . ''; + } - if (getBanInfo($user_id)) { - return '' . $profile . ''; - } + if (getBanInfo($user_id)) { + return '' . $profile . ''; } return $profile; diff --git a/library/language/source/main.php b/library/language/source/main.php index 60ce33da6..27ea61719 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -272,8 +272,8 @@ $lang['SPOILER_HEAD'] = 'hidden text'; $lang['SPOILER_CLOSE'] = 'turn'; $lang['PLAY_ON_CURPAGE'] = 'Start playing on current page'; -$lang['EDITED_TIME_TOTAL'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total -$lang['EDITED_TIMES_TOTAL'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total +$lang['EDITED_TIME_TOTAL'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total +$lang['EDITED_TIMES_TOTAL'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total $lang['LOCK_TOPIC'] = 'Lock the topic'; $lang['UNLOCK_TOPIC'] = 'Unlock the topic'; diff --git a/viewtopic.php b/viewtopic.php index e55a145ef..35dab0a74 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -676,7 +676,7 @@ for ($i = 0; $i < $total_posts; $i++) { 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'POST_ID' => $post_id, 'IS_NEWEST' => ($post_id == $newest), - 'POSTER_NAME' => profile_url(['username' => $poster, 'user_id' => $poster_id, 'user_rank' => $user_rank]), + 'POSTER_NAME' => profile_url(['username' => $poster, 'user_id' => $poster_id, 'user_rank' => $user_rank], no_link: true), 'POSTER_NAME_JS' => addslashes($poster), 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image,