summaryrefslogtreecommitdiff
path: root/modules/blog/blog.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/blog/blog.module')
-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") {