From 80086a9e020645dc54edccf347048e6491b73dde Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 8 Sep 2004 17:45:27 +0000 Subject: - Fixed cache problem introduced by Adrian's PostgreSQL patch. --- includes/bootstrap.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/bootstrap.inc') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 7bfcaa91f..3fa6b1ca2 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -123,9 +123,9 @@ function cache_get($key) { function cache_set($cid, $data, $expire = 0, $headers = NULL) { $data = db_encode_blob($data); - db_query("UPDATE {cache} SET data = '$data', created = " . time() . ", expire = $expire, headers = '$headers' WHERE cid = '$cid'"); + db_query("UPDATE {cache} SET data = '%s', created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid); if (!db_affected_rows()) { - db_query("INSERT INTO {cache} (cid, data, created, expire, headers) VALUES('$cid', '$data', " . time() . ", $expire, '$headers')"); + db_query("INSERT INTO {cache} (cid, data, created, expire, headers) VALUES('%s', '%s', %d, %d, '%s')", $cid, $data, time(), $expire, $headers); } } -- cgit v1.2.3