summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment.module6
-rw-r--r--modules/comment/comment.module6
2 files changed, 10 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module
index d27f36d7d..b4f1971ec 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -200,7 +200,11 @@ function comment_post($edit) {
** one from the comment's body.
*/
- $edit["subject"] = strip_tags(($edit["subject"] ? $edit["subject"] : substr($edit["comment"], 0, 29)));
+ $edit["subject"] = strip_tags($edit["subject"]);
+
+ if ($edit["subject"] == "") {
+ $edit["subject"] = substr(strip_tags($edit["comment"]), 0, 29);
+ }
/*
** Validate the comment's body.
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index d27f36d7d..b4f1971ec 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -200,7 +200,11 @@ function comment_post($edit) {
** one from the comment's body.
*/
- $edit["subject"] = strip_tags(($edit["subject"] ? $edit["subject"] : substr($edit["comment"], 0, 29)));
+ $edit["subject"] = strip_tags($edit["subject"]);
+
+ if ($edit["subject"] == "") {
+ $edit["subject"] = substr(strip_tags($edit["comment"]), 0, 29);
+ }
/*
** Validate the comment's body.