mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Minor improvements (#1411)
* Minor improvements * Update CHANGELOG.md * Update edit_user_profile.php * Updated * Update main.php * Update functions.php
This commit is contained in:
parent
22511c3edc
commit
635d715247
5 changed files with 13 additions and 13 deletions
|
@ -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))
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,14 +2211,14 @@ function profile_url(array $data, bool $target_blank = false): string
|
|||
}
|
||||
|
||||
$profile = '<span title="' . $title . '" class="' . $style . '">' . $username . '</span>';
|
||||
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 = '<a ' . $target_blank . ' href="' . make_url(PROFILE_URL . $user_id) . '">' . $profile . '</a>';
|
||||
}
|
||||
|
||||
if (getBanInfo($user_id)) {
|
||||
return '<s>' . $profile . '</s>';
|
||||
}
|
||||
}
|
||||
|
||||
return $profile;
|
||||
}
|
||||
|
|
|
@ -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 <b>%s</b> 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 <b>%s</b> 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';
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue