mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-26 04:55:12 +02:00
Correctly check empty subjects/messages (Bug #17915)
Do not check usernames against word censor list. Disallowed usernames is already checked and word censor belong to posts. (Bug #17745) Additionally include non-postable forums for moderators forums shown within the teams list. (Bug #17265) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8306 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -520,12 +520,12 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && (
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$subject || !utf8_clean_string($subject))
|
||||
if (utf8_clean_string($subject) === '')
|
||||
{
|
||||
$error[] = $user->lang['EMPTY_SUBJECT'];
|
||||
}
|
||||
|
||||
if (!$message)
|
||||
if (utf8_clean_string($message) === '')
|
||||
{
|
||||
$error[] = $user->lang['TOO_FEW_CHARS'];
|
||||
}
|
||||
@ -769,7 +769,7 @@ if ($submit || $preview || $refresh)
|
||||
}
|
||||
|
||||
// Parse subject
|
||||
if (!$preview && !$refresh && !utf8_clean_string($post_data['post_subject']) && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
|
||||
if (!$preview && !$refresh && utf8_clean_string($post_data['post_subject']) === '' && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
|
||||
{
|
||||
$error[] = $user->lang['EMPTY_SUBJECT'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user