diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-10-14 15:27:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-10-14 15:27:00 +0000 |
commit | 625455b53b0fd13cc9b154bf53a49bd871b6d23a (patch) | |
tree | 4821a2500b4aad004e427c849b8332cc33fa1457 /includes | |
parent | 27c45147191124cbbf40108c2ba8eb41e226fe68 (diff) | |
download | brdo-625455b53b0fd13cc9b154bf53a49bd871b6d23a.tar.gz brdo-625455b53b0fd13cc9b154bf53a49bd871b6d23a.tar.bz2 |
- I tidied up most SQL tables to be more consistent with the rest of the
tables: I changed all "id"s to "xid"s where "x" is the first letter of
the table name. I also renamed all remaining "userid"s to "uid"s as I
mentioned I would do. Take a look at ./drupal/updates/3.00-to-x.xx.sql
for the MySQL updates.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 2 | ||||
-rw-r--r-- | includes/theme.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index 594140a54..644e453c7 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -34,7 +34,7 @@ function error_handler($errno, $message, $filename, $line, $variables) { function watchdog($type, $message) { global $user; - db_query("INSERT INTO watchdog (userid, type, message, location, hostname, timestamp) VALUES ('$user->uid', '". check_input($type) ."', '". check_input($message) ."', '". check_input(getenv("REQUEST_URI")) ."', '". check_input(getenv("REMOTE_ADDR")) ."', '". time() ."')"); + db_query("INSERT INTO watchdog (uid, type, message, location, hostname, timestamp) VALUES ('$user->uid', '". check_input($type) ."', '". check_input($message) ."', '". check_input(getenv("REQUEST_URI")) ."', '". check_input(getenv("REMOTE_ADDR")) ."', '". time() ."')"); } function throttle($type, $rate) { diff --git a/includes/theme.inc b/includes/theme.inc index 5a01e0a91..ac6b5cf86 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -99,7 +99,7 @@ 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" OR $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.uid = '$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"); |