From 42ecb27802c2ed2b5a6d2452d62818ade183aad1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 24 Nov 2001 12:14:31 +0000 Subject: A set of updates to the "_link" system: - Made the /comment links/ jump to the comments instead of to the top of the page. - Replaced the "Add comment"-button by a "add new comment"-link. (This should make UnConeD jump up and down of wild excitement.) - Moved all comment related logic from theme.inc and node.module to comment.inc and comment.module (where they belong). - Added some links to ease the site's usability/navigation. --- modules/node/node.module | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/node') 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[] = "nid ."\">". t("read more") .""; + if ($main && $node->teaser != $node->body) { + $links[] = "nid\">". t("read more") .""; } - if ($node->comment) { - $links[] = "nid ."\">". format_plural(node_get_comments($node->nid), "comment", "comments") .""; + if (module_invoke($node->type, "access", "update", $node)) { + $links[] = "nid\">". t("edit") .""; } - + if (user_access("administer nodes")) { - $links[] = "nid ."\">". t("edit") .""; + $links[] = "nid\">". t("administer") .""; } } -- cgit v1.2.3