Permalink
Browse files

We should only check the censored_subject if we have censoring enabled.

  • Loading branch information...
1 parent 28d33cf commit 4291ae6b8ce59ff218282bf32662d9fc43930fcd @reines reines committed Feb 10, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 edit.php
  2. +2 −2 post.php
View
@@ -66,7 +66,7 @@
if ($subject == '')
$errors[] = $lang_post['No subject'];
- else if ($censored_subject == '')
+ else if ($pun_config['o_censoring'] == '1' && $censored_subject == '')
$errors[] = $lang_post['No subject after censoring'];
else if (pun_strlen($subject) > 70)
$errors[] = $lang_post['Too long subject'];
View
@@ -71,13 +71,13 @@
if ($fid)
{
$subject = pun_trim($_POST['req_subject']);
-
+
if ($pun_config['o_censoring'] == '1')
$censored_subject = pun_trim(censor_words($subject));
if ($subject == '')
$errors[] = $lang_post['No subject'];
- else if ($censored_subject == '')
+ else if ($pun_config['o_censoring'] == '1' && $censored_subject == '')
$errors[] = $lang_post['No subject after censoring'];
else if (pun_strlen($subject) > 70)
$errors[] = $lang_post['Too long subject'];

0 comments on commit 4291ae6

Please sign in to comment.