- modified theme_block() to ignore blocks that have no content.

4.0.x
Kjartan Mannes 2001-09-25 21:26:20 +00:00
parent 858a5cec34
commit a9d2e12419
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ function theme_blocks($region, $theme) {
else $result = db_query("SELECT * FROM blocks WHERE status = 2". (($region == "left" || $region == "right") ? ($region == "left" ? " AND region = 0" : " AND region = 1") : "") ." ORDER BY weight"); else $result = db_query("SELECT * FROM blocks WHERE status = 2". (($region == "left" || $region == "right") ? ($region == "left" ? " AND region = 0" : " AND region = 1") : "") ." ORDER BY weight");
while ($block = db_fetch_object($result)) { while ($block = db_fetch_object($result)) {
$blocks = module_invoke($block->module, "block"); $blocks = module_invoke($block->module, "block");
$theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"], $region); if ($blocks[$block->offset]["content"])
$theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"], $region);
} }
break; break;
} }