diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-09-28 17:53:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-09-28 17:53:04 +0000 |
commit | 32e8d77cd6872b98f5fe00f35b6d124a28a977f0 (patch) | |
tree | e34ba4b39c6db6f62f1c1a237e0d4dcc682f3028 /modules/node | |
parent | b8416f613a0db27c63aa92321a5cb537beb46c54 (diff) | |
download | brdo-32e8d77cd6872b98f5fe00f35b6d124a28a977f0.tar.gz brdo-32e8d77cd6872b98f5fe00f35b6d124a28a977f0.tar.bz2 |
- Associate a callback with the menu links! (This callback is not yet being
called but will be as soon the remaining links have been transformed to use
the menu system.)
- Made sure the menu does not render links with no callback and no children.
Like this, the 'create content' link is not being shown when the user has
no permission to add any content.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index b310f070d..e7844a37b 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -551,17 +551,12 @@ function node_link($type, $node = 0, $main = 0) { $links = array(); - if ($type == "page") { - $links[] = l(t("submit"), "node/add", array("title" => t("Submit or suggest new content."))); - } - if ($type == "node") { if ($node->links) { $links = $node->links; } - if ($main == 1 && $node->teaser && strlen($node->teaser) != strlen($node->body)) - { + if ($main == 1 && $node->teaser && strlen($node->teaser) != strlen($node->body)) { $links[] = l(t("read more"), "node/view/$node->nid", array("title" => t("Read the rest of this posting."), "class" => "read-more")); } @@ -572,6 +567,7 @@ function node_link($type, $node = 0, $main = 0) { if ($type == "system") { menu("node/add", t("create content"), NULL, NULL, 1); + if (user_access("administer nodes")) { menu("admin/node", t("content"), "node_admin", node_help("admin/node")); menu("admin/node/search", t("search"), "node_admin", node_help("admin/node/search"), 8); |