diff options
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 53de72abf..6b0dd88fe 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -143,16 +143,16 @@ function node_link($type, $node = 0, $main = 0) { $links = $node->links; } - if ($node->teaser != $node->body && $main) { - $links[] = "<a href=\"node.php?id=". $node->nid ."\">". t("read more") ."</a>"; + if ($main && $node->teaser != $node->body) { + $links[] = "<a href=\"node.php?id=$node->nid\">". t("read more") ."</a>"; } - if ($node->comment) { - $links[] = "<a href=\"node.php?id=". $node->nid ."\">". format_plural(node_get_comments($node->nid), "comment", "comments") ."</a>"; + if (module_invoke($node->type, "access", "update", $node)) { + $links[] = "<a href=\"module.php?mod=node&op=edit&id=$node->nid\">". t("edit") ."</a>"; } - + if (user_access("administer nodes")) { - $links[] = "<a href=\"admin.php?mod=node&op=edit&id=". $node->nid ."\">". t("edit") ."</a>"; + $links[] = "<a href=\"admin.php?mod=node&op=edit&id=$node->nid\">". t("administer") ."</a>"; } } |