summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc4
-rw-r--r--includes/database.mysql.inc2
-rw-r--r--includes/theme.inc2
3 files changed, 4 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 0bed53fde..85ebb076b 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -38,7 +38,7 @@ function error_handler($errno, $message, $filename, $line, $variables) {
function watchdog($type, $message, $link = NULL) {
global $user;
- db_query("INSERT INTO watchdog (uid, type, message, link, location, hostname, timestamp) VALUES ('%d', '%s', '%s', '%s', '%s', '%s', '%s')", $user->uid, $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time());
+ db_query("INSERT INTO watchdog (uid, type, message, link, location, hostname, timestamp) VALUES (%d, '%s', '%s', '%s', '%s', '%s', %d)", $user->uid, $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time());
}
function throttle($type, $rate) {
@@ -659,7 +659,7 @@ function cache_clear_all($cid = NULL) {
db_query("DELETE FROM cache WHERE expire <> 0");
}
else {
- db_query("DELETE FROM cache WHERE cid = '%d'", $cid);
+ db_query("DELETE FROM cache WHERE cid = %d", $cid);
}
}
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index 3bae578fb..c3ac12876 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -113,7 +113,7 @@ function db_next_id($name) {
db_query("LOCK TABLES sequences WRITE");
$id = db_result(db_query("SELECT id FROM sequences WHERE name = '%s'", $name)) + 1;
- db_query("REPLACE INTO sequences VALUES ('%s', '%d')", $name, $id);
+ db_query("REPLACE INTO sequences VALUES ('%s', %d)", $name, $id);
db_query("UNLOCK TABLES");
return $id;
diff --git a/includes/theme.inc b/includes/theme.inc
index fc2ce1a68..1822da23a 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -181,7 +181,7 @@ function theme_init() {
function theme_blocks($region) {
global $user, $REQUEST_URI;
- $result = db_query("SELECT * FROM blocks WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = '%s' " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1);
+ $result = db_query("SELECT * FROM blocks WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = %d " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1);
while ($result && ($block = db_fetch_object($result))) {
if ((($block->status && (!$user->uid || !$block->custom)) || ($block->custom && $user->block[$block->module][$block->delta])) && (!$block->path || preg_match('/'. str_replace('/', '\/', $block->path) .'/', request_uri()))) {