diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block.module | 2 | ||||
-rw-r--r-- | modules/block/block.module | 2 | ||||
-rw-r--r-- | modules/comment.module | 3 | ||||
-rw-r--r-- | modules/comment/comment.module | 3 | ||||
-rw-r--r-- | modules/queue.module | 4 | ||||
-rw-r--r-- | modules/statistics.module | 2 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 2 | ||||
-rw-r--r-- | modules/user.module | 8 | ||||
-rw-r--r-- | modules/user/user.module | 8 |
9 files changed, 21 insertions, 13 deletions
diff --git a/modules/block.module b/modules/block.module index 130f4e325..dc29b2c8b 100644 --- a/modules/block.module +++ b/modules/block.module @@ -384,7 +384,7 @@ function block_list($region) { if (!($block['throttle'] && (module_invoke("throttle", "status") >= 5))) { $block = array_merge($block, module_invoke($block['module'], 'block', 'view', $block['delta'])); } - if ($block['content']) { + if (isset($block['content']) && $block['content']) { $blocks[$region]["$block[module]_$block[delta]"] = (object) $block; } } diff --git a/modules/block/block.module b/modules/block/block.module index 130f4e325..dc29b2c8b 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -384,7 +384,7 @@ function block_list($region) { if (!($block['throttle'] && (module_invoke("throttle", "status") >= 5))) { $block = array_merge($block, module_invoke($block['module'], 'block', 'view', $block['delta'])); } - if ($block['content']) { + if (isset($block['content']) && $block['content']) { $blocks[$region]["$block[module]_$block[delta]"] = (object) $block; } } diff --git a/modules/comment.module b/modules/comment.module index 14a6223fe..6e7ab5471 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -777,6 +777,7 @@ function comment_perm() { } function comment_link($type, $node = 0, $main = 0) { + $links = array(); if ($type == "node" && $node->comment) { @@ -849,7 +850,7 @@ function comment_link($type, $node = 0, $main = 0) { menu("comment", t("comments"), "comment_page", 0, 1); } - return $links ? $links : array(); + return $links; } function comment_page() { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 14a6223fe..6e7ab5471 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -777,6 +777,7 @@ function comment_perm() { } function comment_link($type, $node = 0, $main = 0) { + $links = array(); if ($type == "node" && $node->comment) { @@ -849,7 +850,7 @@ function comment_link($type, $node = 0, $main = 0) { menu("comment", t("comments"), "comment_page", 0, 1); } - return $links ? $links : array(); + return $links; } function comment_page() { diff --git a/modules/queue.module b/modules/queue.module index 7c118c046..40f619660 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -33,13 +33,15 @@ function queue_perm() { } function queue_link($type) { + $links = array(); + if ($type == "system") { if (user_access("access submission queue")) { menu("queue", t("submission queue"), "queue_page", 1); } } - return $links ? $links : array(); + return $links; } function queue_count() { diff --git a/modules/statistics.module b/modules/statistics.module index fd7d1ed96..2579261d4 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -85,7 +85,7 @@ function statistics_link($type, $node = 0, $main = 0) { } if (user_access("access content")) { - menu("statistics", t("view most popular content"), statistics_page, 0, 1); + menu("statistics", t("view most popular content"), "statistics_page", 0, 1); } } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index fd7d1ed96..2579261d4 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -85,7 +85,7 @@ function statistics_link($type, $node = 0, $main = 0) { } if (user_access("access content")) { - menu("statistics", t("view most popular content"), statistics_page, 0, 1); + menu("statistics", t("view most popular content"), "statistics_page", 0, 1); } } diff --git a/modules/user.module b/modules/user.module index 93d6d9570..2c2d23537 100644 --- a/modules/user.module +++ b/modules/user.module @@ -306,8 +306,11 @@ function user_block($op = "list", $delta = 0) { return $blocks; } else { + $block = array(); + switch ($delta) { case 0: + if (!$user->uid) { /* ** For usability's sake, avoid showing two login forms on one @@ -366,7 +369,6 @@ function user_block($op = "list", $delta = 0) { $block["subject"] = $user->uid ? $user->name : t("Navigation"); $block["content"] = "<div class=\"menu\">". $menu ."</div>"; } - return $block; case 2: if (user_access("access content")) { @@ -415,9 +417,9 @@ function user_block($op = "list", $delta = 0) { } } } + $block["subject"] = t("Who's online"); + $block["content"] = $output; } - $block["subject"] = t("Who's online"); - $block["content"] = $output; return $block; } } diff --git a/modules/user/user.module b/modules/user/user.module index 93d6d9570..2c2d23537 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -306,8 +306,11 @@ function user_block($op = "list", $delta = 0) { return $blocks; } else { + $block = array(); + switch ($delta) { case 0: + if (!$user->uid) { /* ** For usability's sake, avoid showing two login forms on one @@ -366,7 +369,6 @@ function user_block($op = "list", $delta = 0) { $block["subject"] = $user->uid ? $user->name : t("Navigation"); $block["content"] = "<div class=\"menu\">". $menu ."</div>"; } - return $block; case 2: if (user_access("access content")) { @@ -415,9 +417,9 @@ function user_block($op = "list", $delta = 0) { } } } + $block["subject"] = t("Who's online"); + $block["content"] = $output; } - $block["subject"] = t("Who's online"); - $block["content"] = $output; return $block; } } |