|
@@ -93,7 +93,7 @@ if ($request->isPost('form_sent'))
|
|
|
$errors[] = $lang_post['No subject'];
|
|
|
else if ($pun_config['o_censoring'] == '1' && $censored_subject == '')
|
|
|
$errors[] = $lang_post['No subject after censoring'];
|
|
|
- else if (pun_strlen($subject) > 70)
|
|
|
+ else if (mb_strlen($subject) > 70)
|
|
|
$errors[] = $lang_post['Too long subject'];
|
|
|
else if ($pun_config['p_subject_all_caps'] == '0' && is_all_uppercase($subject) && !$pun_user['is_admmod'])
|
|
|
$errors[] = $lang_post['All caps subject'];
|
|
@@ -140,8 +140,7 @@ if ($request->isPost('form_sent'))
|
|
|
// Clean up message from POST
|
|
|
$orig_message = $message = pun_linebreaks(trim($request->postStr('req_message')));
|
|
|
|
|
|
- // Here we use strlen() not pun_strlen() as we want to limit the post to PUN_MAX_POSTSIZE bytes, not characters
|
|
|
- if (pun_strlen($message) > PUN_MAX_POSTSIZE)
|
|
|
+ if (mb_strlen($message) > PUN_MAX_POSTSIZE)
|
|
|
$errors[] = sprintf($lang_post['Too long message'], forum_number_format(PUN_MAX_POSTSIZE));
|
|
|
else if ($pun_config['p_message_all_caps'] == '0' && is_all_uppercase($message) && !$pun_user['is_admmod'])
|
|
|
$errors[] = $lang_post['All caps message'];
|
|
@@ -188,7 +187,7 @@ if ($request->isPost('form_sent'))
|
|
|
require PUN_ROOT.'include/search_idx.php';
|
|
|
|
|
|
// START Merge Post
|
|
|
- if (isset($pun_config['o_merge_timeout']) && !$pun_user['is_guest'] && !$fid && (($is_admmod && $request->isPost('merge')) || !$is_admmod) && $cur_posting['poster_id']!=NULL && $cur_posting['message']!=NULL && ($now - $cur_posting['posted'])<$pun_config['o_merge_timeout'] && (pun_strlen($cur_posting['message'].$message) + 100 < PUN_MAX_POSTSIZE))
|
|
|
+ if (isset($pun_config['o_merge_timeout']) && !$pun_user['is_guest'] && !$fid && (($is_admmod && $request->isPost('merge')) || !$is_admmod) && $cur_posting['poster_id']!=NULL && $cur_posting['message']!=NULL && ($now - $cur_posting['posted'])<$pun_config['o_merge_timeout'] && (mb_strlen($cur_posting['message'].$message) + 100 < PUN_MAX_POSTSIZE))
|
|
|
{
|
|
|
$message= '[after='.($now - $cur_posting['posted']).']'."\n".$message;
|
|
|
$merged = true;
|