summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-16 17:29:26 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-16 17:29:26 +0000
commit880842885bd3e970bb752248ba72fb7b9957bc77 (patch)
tree90deba74233ee69c3b08c41d3802138527ddf06e /includes
parent7624580f76937fbb004f81da8e6069dbb16921dc (diff)
downloadbrdo-880842885bd3e970bb752248ba72fb7b9957bc77.tar.gz
brdo-880842885bd3e970bb752248ba72fb7b9957bc77.tar.bz2
- Fixed bug #3637: made comment module settings translatable. Patch #13 by Moshe.
- Fixed bug #3642: removed duplicate settings from user page. Patch #14 by Moshe. - Fixed bug #3503: added 'forum topic' link to the 'create content' menu. Patch by Gobar. I think this might be more intuitive and consistent code-wise; I don't want to introduce small hacks. - Cache improvement: small cache improvement to prevent SQL errors. Patch by Jeremy.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 8587741b7..8aa9e853e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -755,10 +755,8 @@ function cache_get($key) {
}
function cache_set($cid, $data, $expire = 0) {
- 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("UPDATE {cache} SET data = '%s', created = %d, expire = %d WHERE cid = '%s'", $data, time(), $expire, $cid);
+ if (!db_affected_rows()) {
db_query("INSERT INTO {cache} (cid, data, created, expire) VALUES('%s', '%s', %d, %d)", $cid, $data, time(), $expire);
}
}