diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-09-03 20:18:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-09-03 20:18:03 +0000 |
commit | 30c546931d63c619cfbe0bea198f99d51f0343ac (patch) | |
tree | 45c87a78b3922a5e4e37807f4bccbc4ad12aec4d | |
parent | 2c342df5a90dcfa48cd66cdda369f0944787d45a (diff) | |
download | brdo-30c546931d63c619cfbe0bea198f99d51f0343ac.tar.gz brdo-30c546931d63c619cfbe0bea198f99d51f0343ac.tar.bz2 |
- Fixed bug with being able to post comments while you shouldn't. Patch by
Garym.
-rw-r--r-- | modules/comment.module | 15 | ||||
-rw-r--r-- | modules/comment/comment.module | 15 |
2 files changed, 14 insertions, 16 deletions
diff --git a/modules/comment.module b/modules/comment.module index 99ecb50d7..83db22c4d 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -769,11 +769,13 @@ function comment_link($type, $node = 0, $main = 0) { } } else { - if (user_access("post comments")) { - $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); - } - else { - $links[] = theme("comment_post_forbidden"); + if ($node->comment == 2) { + if (user_access("post comments")) { + $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); + } + else { + $links[] = theme("comment_post_forbidden"); + } } } } @@ -792,9 +794,6 @@ function comment_link($type, $node = 0, $main = 0) { $links[] = theme("comment_post_forbidden"); } } - else { - $links[] = t("Closed discussion: you can't post new comments."); - } } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 99ecb50d7..83db22c4d 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -769,11 +769,13 @@ function comment_link($type, $node = 0, $main = 0) { } } else { - if (user_access("post comments")) { - $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); - } - else { - $links[] = theme("comment_post_forbidden"); + if ($node->comment == 2) { + if (user_access("post comments")) { + $links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page."))); + } + else { + $links[] = theme("comment_post_forbidden"); + } } } } @@ -792,9 +794,6 @@ function comment_link($type, $node = 0, $main = 0) { $links[] = theme("comment_post_forbidden"); } } - else { - $links[] = t("Closed discussion: you can't post new comments."); - } } } |