Commit 7d19e3dc authored by Dries's avatar Dries

- Patch #8553 by Moshe: hide the 'add new comment' link when showing the
  comment form.
parent bb961e25
......@@ -755,9 +755,9 @@ function comment_link($type, $node = 0, $main = 0) {
}
else {
// Node page: add a "post comment" link if the user is allowed to
// post comments and if this node is not read-only
// post comments, if this node is not read-only, and if the comment form isn't already shown
if ($node->comment == 2) {
if ($node->comment == 2 && variable_get('comment_form_location', 0) == 0) {
if (user_access('post comments')) {
$links[] = l(t('add new comment'), "comment/reply/$node->nid", array('title' => t('Share your thoughts and opinions related to this posting.')), NULL, 'comment');
}
......
......@@ -755,9 +755,9 @@ function comment_link($type, $node = 0, $main = 0) {
}
else {
// Node page: add a "post comment" link if the user is allowed to
// post comments and if this node is not read-only
// post comments, if this node is not read-only, and if the comment form isn't already shown
if ($node->comment == 2) {
if ($node->comment == 2 && variable_get('comment_form_location', 0) == 0) {
if (user_access('post comments')) {
$links[] = l(t('add new comment'), "comment/reply/$node->nid", array('title' => t('Share your thoughts and opinions related to this posting.')), NULL, 'comment');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment