diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-11-27 18:43:49 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-11-27 18:43:49 +0000 |
commit | 1b733dc98aaeb20d250414acc6bf428c7868d013 (patch) | |
tree | 1d83a5903a19ce60443c70dce815a9efe107000d /modules | |
parent | 1d63fec89bc98f1b452fe510c20c68c62efb80ec (diff) | |
download | brdo-1b733dc98aaeb20d250414acc6bf428c7868d013.tar.gz brdo-1b733dc98aaeb20d250414acc6bf428c7868d013.tar.bz2 |
- Fix blocks of throttle and queue module. Patch by Gerhard.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/queue.module | 8 | ||||
-rw-r--r-- | modules/throttle.module | 17 | ||||
-rw-r--r-- | modules/throttle/throttle.module | 17 |
3 files changed, 23 insertions, 19 deletions
diff --git a/modules/queue.module b/modules/queue.module index c7b6db3fa..4c70a11b6 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -198,14 +198,12 @@ function queue_block($op = "list", $delta = 0) { } } - $block[0]["subject"] = t("Moderation results"); - $block[0]["content"] = $output ? $output : t("This node has not been moderated yet."); - $block[0]["info"] = t("Moderation results"); + $block["subject"] = t("Moderation results"); + $block["content"] = $output ? $output : t("This node has not been moderated yet."); } } elseif ((user_access("access submission queue") || user_access("administer blocks")) && (substr_count(request_uri(), drupal_url(array("mod" => "user"), "module")) || substr_count(request_uri(), drupal_url(array(), "admin")))) { - $block[0]["subject"] = t("Moderation results"); - $block[0]["info"] = t("Moderation results"); + $block["subject"] = t("Moderation results"); } return $block; diff --git a/modules/throttle.module b/modules/throttle.module index bc3574b5e..b5481824e 100644 --- a/modules/throttle.module +++ b/modules/throttle.module @@ -142,13 +142,16 @@ function throttle_display_throttle_block() { } /* Block hook */ -function throttle_block() { - - $block[0]["subject"] = "Throttle status"; - $block[0]["content"] = throttle_display_throttle_block(); - $block[0]["info"] = "Throttle status"; - - return $block; +function throttle_block($op = "list", $delta = 0) { + if ($op == "list") { + $blocks[0]["info"] = t("Throttle status"); + return $blocks; + } + else { + $block["subject"] = t("Throttle status"); + $block["content"] = throttle_display_throttle_block(); + return $block; + } } ?> diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module index bc3574b5e..b5481824e 100644 --- a/modules/throttle/throttle.module +++ b/modules/throttle/throttle.module @@ -142,13 +142,16 @@ function throttle_display_throttle_block() { } /* Block hook */ -function throttle_block() { - - $block[0]["subject"] = "Throttle status"; - $block[0]["content"] = throttle_display_throttle_block(); - $block[0]["info"] = "Throttle status"; - - return $block; +function throttle_block($op = "list", $delta = 0) { + if ($op == "list") { + $blocks[0]["info"] = t("Throttle status"); + return $blocks; + } + else { + $block["subject"] = t("Throttle status"); + $block["content"] = throttle_display_throttle_block(); + return $block; + } } ?> |