summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-08-08 22:57:10 +0000
committerDries Buytaert <dries@buytaert.net>2003-08-08 22:57:10 +0000
commitcecaa68e6570a5c9ba65ef3039c1252408c79c58 (patch)
tree03a6617576f58dba5df4e644effc707473eaf704
parent39950fe2e22b479284f758131e7050f36ef83899 (diff)
downloadbrdo-cecaa68e6570a5c9ba65ef3039c1252408c79c58.tar.gz
brdo-cecaa68e6570a5c9ba65ef3039c1252408c79c58.tar.bz2
- Miscellanious comment module fixes. Patch 20030806.comment-misc.patch by
Bart Jansens.
-rw-r--r--modules/comment.module6
-rw-r--r--modules/comment/comment.module6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 4ef227806..48cd7fc48 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -195,7 +195,7 @@ function comment_reply($pid, $nid) {
$comment = db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c LEFT JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0", $pid));
comment_view($comment);
}
- else {
+ else if (user_access("access content")) {
node_view(node_load(array("nid" => $nid)));
$pid = 0;
}
@@ -204,10 +204,10 @@ function comment_reply($pid, $nid) {
** If possible, show reply form
*/
- if (node_comment_mode($nid) == 1) {
+ if (node_comment_mode($nid) != 2) {
theme("box", t("Reply"), t("This discussion is closed: you can't post new comments."));
}
- else if (user_access("post comments", $context)) {
+ else if (user_access("post comments")) {
theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid)));
}
else {
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 4ef227806..48cd7fc48 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -195,7 +195,7 @@ function comment_reply($pid, $nid) {
$comment = db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c LEFT JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0", $pid));
comment_view($comment);
}
- else {
+ else if (user_access("access content")) {
node_view(node_load(array("nid" => $nid)));
$pid = 0;
}
@@ -204,10 +204,10 @@ function comment_reply($pid, $nid) {
** If possible, show reply form
*/
- if (node_comment_mode($nid) == 1) {
+ if (node_comment_mode($nid) != 2) {
theme("box", t("Reply"), t("This discussion is closed: you can't post new comments."));
}
- else if (user_access("post comments", $context)) {
+ else if (user_access("post comments")) {
theme("box", t("Reply"), comment_form(array("pid" => $pid, "nid" => $nid)));
}
else {