mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
- Bug 1100
git-svn-id: file:///svn/phpbb/trunk@5682 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
0818b471e6
commit
6950059475
1 changed files with 2 additions and 2 deletions
|
@ -760,12 +760,12 @@ class parse_message extends bbcode_firstpass
|
|||
$replace = array("\n", '', "\n\n", "\\1:");
|
||||
$this->message = preg_replace($match, $replace, trim($this->message));
|
||||
|
||||
// Message length check. -1 disables this check completely, even allows empty messsages.
|
||||
// Message length check. -1 disables this check completely.
|
||||
if ($config['max_' . $mode . '_chars'] != -1)
|
||||
{
|
||||
$msg_len = ($mode == 'post') ? strlen($this->message) : strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#is', ' ', $this->message));
|
||||
|
||||
if (!$msg_len || ($config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars']))
|
||||
if ($config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars'])
|
||||
{
|
||||
$this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : $user->lang['TOO_MANY_CHARS'];
|
||||
return $this->warn_msg;
|
||||
|
|
Loading…
Add table
Reference in a new issue