- Fixed bug with being able to post comments while you shouldn't. Patch by
Garym.4.3.x
parent
2c342df5a9
commit
30c546931d
|
@ -769,11 +769,13 @@ function comment_link($type, $node = 0, $main = 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (user_access("post comments")) {
|
if ($node->comment == 2) {
|
||||||
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page.")));
|
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");
|
else {
|
||||||
|
$links[] = theme("comment_post_forbidden");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -792,9 +794,6 @@ function comment_link($type, $node = 0, $main = 0) {
|
||||||
$links[] = theme("comment_post_forbidden");
|
$links[] = theme("comment_post_forbidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$links[] = t("Closed discussion: you can't post new comments.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -769,11 +769,13 @@ function comment_link($type, $node = 0, $main = 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (user_access("post comments")) {
|
if ($node->comment == 2) {
|
||||||
$links[] = l(t("add new comment"), "comment/reply/$node->nid", array("title" => t("Add a new comment to this page.")));
|
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");
|
else {
|
||||||
|
$links[] = theme("comment_post_forbidden");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -792,9 +794,6 @@ function comment_link($type, $node = 0, $main = 0) {
|
||||||
$links[] = theme("comment_post_forbidden");
|
$links[] = theme("comment_post_forbidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$links[] = t("Closed discussion: you can't post new comments.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue