summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-25 13:59:01 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-25 13:59:01 -0800
commit7c9bd9e8e8c4d2e57c4f08f526e5464236fa90e3 (patch)
tree0a5ee072cc38f4a5c989bc387b69551382ac4f3d
parente105d1fdb49ed9bbe5f20477fac77dfe63d5844d (diff)
Call execute() after upate() and insert().
-rw-r--r--modules/gallery/libraries/drivers/Cache/Database.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php
index d27bcc32..eda445b6 100644
--- a/modules/gallery/libraries/drivers/Cache/Database.php
+++ b/modules/gallery/libraries/drivers/Cache/Database.php
@@ -64,11 +64,14 @@ class Cache_Database_Driver extends Cache_Driver {
$status = db::build()->update(
"caches",
array("tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data)),
- array("key", "=", $id));
+ array("key", "=", $id))
+ ->execute();
} else {
$status = db::build()->insert(
"caches",
- array("key" => $id, "tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data)));
+ array("key" => $id, "tags" => $tags,
+ "expiration" => $lifetime, "cache" => serialize($data)))
+ ->execute();
}
}
@@ -185,6 +188,6 @@ class Cache_Database_Driver extends Cache_Driver {
* Empty the cache
*/
public function delete_all() {
- db::build()->query("TRUNCATE {caches}");
+ db::build()->query("TRUNCATE {caches}")->execute();
}
} \ No newline at end of file