From 57e5f6a4d1d7fd682aaed012f866f872678bc0d0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 27 Feb 2001 20:58:51 +0000 Subject: - fixed bug in block placement when (1) using a theme with 2 side bars and (2) being logged out. (reported by Jeroen) - themed "Editor's note" in theme marvin. (reported by Jeroen) --- includes/theme.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index d5ea7dc87..7689ea2c7 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -79,7 +79,7 @@ function theme_blocks($region, $theme) { break; case "/index.php": if ($user->id) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status AND l.user = '$user->id'))". (($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 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)) { $blocks = module_execute($block->module, "block"); $theme->box(t($blocks[$block->offset]["subject"]), $blocks[$block->offset]["content"]); -- cgit v1.2.3