diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-10-12 18:35:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-10-12 18:35:21 +0000 |
commit | 73d61b7839c407cee996a6d79f7d4bce63e81d87 (patch) | |
tree | 4aa4090e16490588a38d2e2cfd2abff6ba899c18 /includes/theme.inc | |
parent | d6e54f8fa1cdfa0bf2c974096cb736c1af59b4bf (diff) | |
download | brdo-73d61b7839c407cee996a6d79f7d4bce63e81d87.tar.gz brdo-73d61b7839c407cee996a6d79f7d4bce63e81d87.tar.bz2 |
- fixed 4 SQL queries to use ANSI SQL instead: '||' --> 'OR'
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index a4d0eb2a6..95be767b9 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -97,8 +97,8 @@ 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.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"); + 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" OR $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" OR $region == "right") ? ($region == "left" ? " AND region = 0" : " AND region = 1") : "") ." ORDER BY weight"); while ($result && ($block = db_fetch_object($result))) { $blocks = module_invoke($block->module, "block"); if ($blocks[$block->offset]["content"]) |