summaryrefslogtreecommitdiff
path: root/modules/blog/blog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-12-29 10:58:01 +0000
committerDries Buytaert <dries@buytaert.net>2003-12-29 10:58:01 +0000
commitc2292d224b367f65f78bb58f0449c0a1edaf4059 (patch)
treeda7711c5e0797d70db19929bb0f5cc31b30e9de5 /modules/blog/blog.module
parentbaaa21e1316354ada6d985a5b799ce17d6255590 (diff)
downloadbrdo-c2292d224b367f65f78bb58f0449c0a1edaf4059.tar.gz
brdo-c2292d224b367f65f78bb58f0449c0a1edaf4059.tar.bz2
- Removed some dead code and improved the link emission. Patch by Kjartan.
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r--modules/blog/blog.module6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 478449ee1..3468d5354 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -248,8 +248,6 @@ function blog_link($type, $node = 0, $main) {
if ($type == "system") {
if (user_access("maintain personal blog")) {
menu("node/add/blog", t("blog entry"), "node_page", 0);
- }
- if (user_access("maintain personal blog")) {
menu("blog/". $user->uid, t("my blog"), "blog_page", 1);
}
if (user_access("access content")) {
@@ -262,12 +260,10 @@ function blog_link($type, $node = 0, $main) {
}
if ($type == "node" && $node->type == "blog") {
- global $mod, $op, $id;
-
if (blog_access("update", $node)) {
$links[] = l(t("edit this blog entry"), "node/edit/$node->nid", array("title" => t("Edit this blog entry.")));
}
- elseif (empty($id)) {
+ elseif (arg(0) != 'blog' && arg(1) != $node->uid) {
$links[] = l(t("%username's blog", array("%username" => $node->name)), "blog/$node->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $node->name))));
}
}