diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-10-26 15:17:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-10-26 15:17:26 +0000 |
commit | 8d103a08984ac2de72d756eb5c5c8d23061ab028 (patch) | |
tree | e8cb8b9b2f071a9b7bd2e222d8183e5c27ad6683 /modules/cloud.module | |
parent | 2ec14f35ac7d5600e6d03b5cf79f717f43d1cfab (diff) | |
download | brdo-8d103a08984ac2de72d756eb5c5c8d23061ab028.tar.gz brdo-8d103a08984ac2de72d756eb5c5c8d23061ab028.tar.bz2 |
- Committed Marco's block rewrite:
+ Blocks are not longer called if not rendered: major performance
improvement.
+ Fixed some bugs (preview option was broken, path option was broken).
+ Removed "ascii"-type blocks.
+ Added permission to for "PHP blocks"
+ ...
NOTES:
+ You'll want to run "update.php":
ALTER TABLE blocks DROP remove;
ALTER TABLE blocks DROP name;
+ You'll want to update your custom modules as well as the modules in
the contrib repository. Block function should now read:
function *_block($op = "list", $delta = 0) {
if ($op == "list") {
return array of block infos
}
else {
return subject and content of $delta block
}
}
Diffstat (limited to 'modules/cloud.module')
-rw-r--r-- | modules/cloud.module | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/modules/cloud.module b/modules/cloud.module index 2d42992f6..0847437c4 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -167,11 +167,16 @@ function cloud_page() { } } -function cloud_block() { - $block[0]["subject"] = t("Site cloud"); - $block[0]["content"] = cloud_list(20) ."<br /><div align=\"right\">". lm(t("more"), array("mod" => "cloud"), "", array("title" => t("Monitor other sites in the cloud."))) ."</div>"; - $block[0]["info"] = t("Site cloud"); - return $block; +function cloud_block($op = "list", $delta = 0) { + if ($op == "list") { + $blocks[0]["info"] = t("Site cloud"); + return $blocks; + } + else { + $block["subject"] = t("Site cloud"); + $block["content"] = cloud_list(20) ."<br /><div align=\"right\">". lm(t("more"), array("mod" => "cloud"), "", array("title" => t("Monitor other sites in the cloud."))) ."</div>"; + return $block; + } } function cloud_admin() { @@ -209,4 +214,4 @@ function cloud_admin() { } } -?> +?>
\ No newline at end of file |