summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-10-09 21:01:47 +0000
committerDries Buytaert <dries@buytaert.net>2001-10-09 21:01:47 +0000
commitf1932821bedfe603eb7a5a7c210e0a7e4c1b4157 (patch)
tree9686b19c30d852f11d5e85f7db104fcf24e22a67 /includes/theme.inc
parent47c6fce5ce33e510fb3a4e51ce7c34db082590c4 (diff)
downloadbrdo-f1932821bedfe603eb7a5a7c210e0a7e4c1b4157.tar.gz
brdo-f1932821bedfe603eb7a5a7c210e0a7e4c1b4157.tar.bz2
- PEAR-ification of Drupal by claw: you can now host Drupal on a wide
range of databases including MySQL, PostgreSQL, MSSQL, and others. For additional information and an 'how to upgrade', check the mails sent to the mailing list.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 345275617..a4d0eb2a6 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -96,12 +96,13 @@ function theme_blocks($region, $theme) {
}
break;
case "/index.php":
- if ($user->uid) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status = 1 AND l.user = '$user->uid'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.region = 1") : "") ." ORDER BY weight");
+
+ if ($user->uid) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status = 1 AND l.userid = '$user->uid'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.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 ($result && ($block = db_fetch_object($result))) {
$blocks = module_invoke($block->module, "block");
if ($blocks[$block->offset]["content"])
- $theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"], $region);
+ $theme->box(t($blocks[$block->delta]["subject"]), $blocks[$block->delta]["content"], $region);
}
break;
}