Maked max smilies in PM configurable (#211)

This commit is contained in:
Roman Kelesidis 2023-07-11 12:48:38 +07:00 committed by GitHub
parent 96828ca3d1
commit 728c074532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@
- Release v2.1.5-2023.07 🎉 - Release v2.1.5-2023.07 🎉
- Fix RFC 1918 RegExp [\#210](https://github.com/torrentpier/torrentpier-lts/pull/210) ([belomaxorka](https://github.com/belomaxorka)) - Fix RFC 1918 RegExp [\#210](https://github.com/torrentpier/torrentpier-lts/pull/210) ([belomaxorka](https://github.com/belomaxorka))
- Maked max smilies in PM configurable [\#211](https://github.com/torrentpier/torrentpier-lts/pull/211) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.06](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.06) (2023-07-04) ## [v2.1.5-2023.06](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.06) (2023-07-04)
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.05...v2.1.5-2023.06) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.05...v2.1.5-2023.06)

View File

@ -927,6 +927,17 @@ else if ( $submit || $refresh || $mode != '' )
$error = TRUE; $error = TRUE;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['EMPTY_MESSAGE']; $error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . $lang['EMPTY_MESSAGE'];
} }
// Check smilies limit
if ($bb_cfg['max_smilies_pm'])
{
$count_smilies = substr_count(bbcode2html($privmsg_message), '<img class="smile" src="'. $bb_cfg['smilies_path']);
if ($count_smilies > $bb_cfg['max_smilies_pm'])
{
$error = TRUE;
$error_msg .= ( ( !empty($error_msg) ) ? '<br />' : '' ) . sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies_pm']);
}
}
} }
if ( $submit && !$error ) if ( $submit && !$error )