summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-03-29 18:08:56 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-03-29 18:08:56 +0000
commite73a163dbdbeace6e61e9c14e6ad9fc0041a8542 (patch)
treec635e5fae3a7bd3cb25f4ba153b0aca8219e7cb7
parent4742ba3549a72b431fc8cad8bd9019e5f59aed9a (diff)
downloadbrdo-e73a163dbdbeace6e61e9c14e6ad9fc0041a8542.tar.gz
brdo-e73a163dbdbeace6e61e9c14e6ad9fc0041a8542.tar.bz2
- Rollback: $cid in cache_set() is not required to be numerical.
-rw-r--r--includes/common.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index efc6900cb..43f580a48 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -645,8 +645,8 @@ function cache_get($key) {
}
function cache_set($cid, $data, $expire = 0) {
- if (db_fetch_object(db_query("SELECT cid FROM cache WHERE cid = '%d'", $cid))) {
- db_query("UPDATE cache SET data = '%s', created = %d, expire = %d WHERE cid = '%d'", $data, time(), $expire, $cid);
+ if (db_fetch_object(db_query("SELECT cid FROM cache WHERE cid = '%s'", $cid))) {
+ db_query("UPDATE cache SET data = '%s', created = %d, expire = %d WHERE cid = '%s'", $data, time(), $expire, $cid);
}
else {
db_query("INSERT INTO cache (cid, data, created, expire) VALUES('%s', '%s', %d, %d)", $cid, $data, time(), $expire);