summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 19:19:51 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-11 19:19:51 +0000
commite0cf9c21a1e1c8d6825a1d5af27f474f2cd6fc02 (patch)
tree72ce89f534ea337f6dabded8dae07e2a69d24a6a
parent89b0570d707e7a895a832f877dcdc74b68d26d42 (diff)
downloadbrdo-e0cf9c21a1e1c8d6825a1d5af27f474f2cd6fc02.tar.gz
brdo-e0cf9c21a1e1c8d6825a1d5af27f474f2cd6fc02.tar.bz2
#319403 by Crell: use fetchObject() in cache.inc for consistency with other db fetch routines.
-rw-r--r--includes/cache.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/cache.inc b/includes/cache.inc
index 19fa04bf3..83cd23e47 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -2,15 +2,15 @@
// $Id$
/**
- * Return data from the persistent cache. Data may be stored as either plain
- * text or as serialized data. cache_get will automatically return
+ * Return data from the persistent cache. Data may be stored as either plain
+ * text or as serialized data. cache_get will automatically return
* unserialized objects and arrays.
*
* @param $cid
* The cache ID of the data to retrieve.
* @param $table
- * The table $table to store the data in. Valid core values are
- * 'cache_filter', 'cache_menu', 'cache_page', or 'cache' for
+ * The table $table to store the data in. Valid core values are
+ * 'cache_filter', 'cache_menu', 'cache_page', or 'cache' for
* the default cache.
* @return The cache or FALSE on failure.
*/
@@ -29,7 +29,7 @@ function cache_get($cid, $table = 'cache') {
->execute();
}
- $cache = db_query("SELECT data, created, headers, expire, serialized FROM {" . $table . "} WHERE cid = :cid", array(':cid' => $cid))->fetch();
+ $cache = db_query("SELECT data, created, headers, expire, serialized FROM {" . $table . "} WHERE cid = :cid", array(':cid' => $cid))->fetchObject();
if (isset($cache->data)) {
// If the data is permanent or we're not enforcing a minimum cache lifetime
// always return the cached data.
@@ -87,11 +87,11 @@ function cache_get($cid, $table = 'cache') {
* @param $cid
* The cache ID of the data to store.
* @param $data
- * The data to store in the cache. Complex data types will be automatically
+ * The data to store in the cache. Complex data types will be automatically
* serialized before insertion.
* Strings will be stored as plain text and not serialized.
* @param $table
- * The table $table to store the data in. Valid core values are
+ * The table $table to store the data in. Valid core values are
* 'cache_filter', 'cache_menu', 'cache_page', or 'cache'.
* @param $expire
* One of the following values: