diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
commit | f104d3cc12134fc574373d6a643d9c84a317de44 (patch) | |
tree | 838bcdb9cff17d43ec39a5ebdfd3274916839580 /modules/blog/blog.module | |
parent | 645d026e098a4dccef1bbbf0e40b9eecc8599daa (diff) | |
download | brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.gz brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.bz2 |
- Committed the admin menu integration patch. Thanks Adrian, Stefan and others.
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r-- | modules/blog/blog.module | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module index e66460334..5f00f3d8a 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -259,16 +259,17 @@ function blog_link($type, $node = 0, $main) { $links = array(); - if ($type == "page" && user_access("access content")) { - $links[] = l(t("blogs"), "blog", array("title" => t("Read the latest blog entries."))); - } - - if ($type == "menu.create" && user_access("maintain personal blog")) { - $links[] = l(t("create blog entry"), "node/add/blog", array("title" => t("Add a new personal blog entry."))); + if ($type == "system") { + if (user_access("maintain personal blog")) { + menu("node/add/blog", t("create blog entry"), NULL, NULL, 0); + } + if (user_access("maintain personal blog")) { + menu("blog/" . $user->uid,t("view personal blog"), NULL, NULL, 1); + } } - if ($type == "menu.view" && user_access("maintain personal blog")) { - $links[] = l(t("view personal blog"), "blog/$user->uid", array("title" => t("Read your latest blog entries."))); + if ($type == "page" && user_access("access content")) { + $links[] = l(t("blogs"), "blog", array("title" => t("Read the latest blog entries."))); } if ($type == "node" && $node->type == "blog") { |