From 931c49d46ee332147e33d34b76f5f6bf98f96701 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 18 Jun 2023 14:41:11 +0700 Subject: [PATCH] Minor improvements (#188) --- library/ajax/posts.php | 14 ++++++++++++++ library/config.php | 2 +- library/includes/functions_post.php | 12 +++++++++++- library/language/en/main.php | 1 + library/language/ru/main.php | 1 + library/language/uk/main.php | 1 + 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/library/ajax/posts.php b/library/ajax/posts.php index 2a6c8dc0..368a12aa 100644 --- a/library/ajax/posts.php +++ b/library/ajax/posts.php @@ -138,6 +138,13 @@ switch($this->request['type']) { if ($text != $post['post_text']) { + if ($bb_cfg['max_post_length']) + { + if (mb_strlen($text, 'UTF-8') > $bb_cfg['max_post_length']) + { + $this->ajax_die(sprintf($lang['MAX_POST_LEN_PER_POST'], $bb_cfg['max_post_length'])); + } + } if ($bb_cfg['max_smilies']) { $count_smilies = substr_count(bbcode2html($text), '