mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Replaced some string functions to mbstring alternatives (#1735)
* Replaced some string functions to mbstring alternatives * Update CHANGELOG.md * Update admin_attach_cp.php * Update CHANGELOG.md
This commit is contained in:
parent
e5aaaf4abd
commit
e75d2859c3
4 changed files with 4 additions and 7 deletions
|
@ -11,6 +11,7 @@
|
|||
- Created `VersionHelper.php` [\#1731](https://github.com/torrentpier/torrentpier/pull/1731) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Drop Ocelot announcer support 🫡 [\#1727](https://github.com/torrentpier/torrentpier/pull/1727) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Use `DEFAULT_CHARSET` constant instead of hardcoded string [\#1734](https://github.com/torrentpier/torrentpier/pull/1734) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Replaced some string functions to `mbstring` alternatives [\#1735](https://github.com/torrentpier/torrentpier/pull/1735) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Replaced some `html_entity_decode` to engine's built-in function [\#1733](https://github.com/torrentpier/torrentpier/pull/1733) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Show torrent's announcers list in `filelist.php` page [\#1708](https://github.com/torrentpier/torrentpier/pull/1708) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- [PHP 8.4] Fixed some deprecations [\#1718](https://github.com/torrentpier/torrentpier/pull/1718) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
|
|
@ -422,11 +422,7 @@ if ($view === 'attachments') {
|
|||
|
||||
$row = DB()->sql_fetchrow($result);
|
||||
DB()->sql_freeresult($result);
|
||||
$post_title = $row['topic_title'];
|
||||
|
||||
if (strlen($post_title) > 32) {
|
||||
$post_title = str_short($post_title, 30);
|
||||
}
|
||||
$post_title = str_short($row['topic_title'], 30);
|
||||
|
||||
$view_topic = BB_ROOT . POST_URL . $ids[$j]['post_id'] . '#' . $ids[$j]['post_id'];
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class WordsRate
|
|||
$this->del_text_hl = $text;
|
||||
|
||||
// Long text
|
||||
if (strlen($text) > 600) {
|
||||
if (mb_strlen($text, DEFAULT_CHARSET) > 600) {
|
||||
return $this->words_rate;
|
||||
}
|
||||
// Crop quotes if contains +1
|
||||
|
|
|
@ -112,7 +112,7 @@ class Validate
|
|||
}
|
||||
|
||||
// Check max length
|
||||
if (\strlen($email) > USEREMAIL_MAX_LENGTH) {
|
||||
if (mb_strlen($email, DEFAULT_CHARSET) > USEREMAIL_MAX_LENGTH) {
|
||||
return $lang['EMAIL_TOO_LONG'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue