diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/blog.module | 3 | ||||
-rw-r--r-- | modules/blog/blog.module | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/blog.module b/modules/blog.module index 69c775720..b41323538 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -303,10 +303,11 @@ function blog_link($type, $node = 0, $main) { } if ($type == "node" && $node->type == "blog") { + global $mod, $op, $id; if (blog_access("update", $node)) { $links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Edit this blog entry."))); } - else { + elseif ($mod == "blog" && $op != "view" && !$id) { $links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), "", array("title" => t("Read %u's latest blog entries.", array("%u" => $node->name)))); } } diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 69c775720..b41323538 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -303,10 +303,11 @@ function blog_link($type, $node = 0, $main) { } if ($type == "node" && $node->type == "blog") { + global $mod, $op, $id; if (blog_access("update", $node)) { $links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Edit this blog entry."))); } - else { + elseif ($mod == "blog" && $op != "view" && !$id) { $links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), "", array("title" => t("Read %u's latest blog entries.", array("%u" => $node->name)))); } } |