summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-09-26 10:04:09 +0000
committerDries Buytaert <dries@buytaert.net>2003-09-26 10:04:09 +0000
commitf104d3cc12134fc574373d6a643d9c84a317de44 (patch)
tree838bcdb9cff17d43ec39a5ebdfd3274916839580 /modules/blog
parent645d026e098a4dccef1bbbf0e40b9eecc8599daa (diff)
downloadbrdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.gz
brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.bz2
- Committed the admin menu integration patch. Thanks Adrian, Stefan and others.
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module17
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") {