diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-04-21 14:55:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-04-21 14:55:03 +0000 |
commit | a956de78b9681f55cfc81785306031aa6e3ac9c1 (patch) | |
tree | feae400f1ae2191fb3253f527be4cc2d01728a62 /modules/blog.module | |
parent | 716e833a6e103585d1d1478b6a4ee47a1e8bbbef (diff) | |
download | brdo-a956de78b9681f55cfc81785306031aa6e3ac9c1.tar.gz brdo-a956de78b9681f55cfc81785306031aa6e3ac9c1.tar.bz2 |
- Fixed some PHP "notices".
Diffstat (limited to 'modules/blog.module')
-rw-r--r-- | modules/blog.module | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/blog.module b/modules/blog.module index 7f8b04f1d..dc90b99cd 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -51,12 +51,14 @@ function blog_head($main = 0) { $mod = arg(0); $id = arg(1); + $output = array(); + if ($mod == "blog" && $id) { $account = user_load(array("uid" => $id)); $output[] = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS - ". $account->name. "'s blog\" href=\"". url("blog/view/$id") ."\" />"; } - return $output ? $output : array(); + return $output; } function blog_user($type, &$edit, &$user) { @@ -208,6 +210,8 @@ function blog_page() { function blog_link($type, $node = 0, $main) { global $user; + $links = array(); + if ($type == "page" && user_access("access content")) { $links[] = l(t("user blogs"), "blog", array("title" => t("Read the latest blog entries."))); } @@ -231,7 +235,7 @@ function blog_link($type, $node = 0, $main) { } } - return $links ? $links : array(); + return $links; } function blog_block($op = "list", $delta = 0) { |