diff options
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r-- | engine/lib/database.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index b5ad7897f..c44fdf1fd 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -400,11 +400,10 @@ function get_data_row($query, $callback = "") { function elgg_query_runner($query, $callback = null, $single = false) { global $CONFIG, $DB_QUERY_CACHE; - $query = elgg_format_query($query); - - // since we want to cache results of running the callback, we need to - // need to namespace the query with the callback, and single result request. - $hash = (string)$callback . (string)$single . $query; + // Since we want to cache results of running the callback, we need to + // need to namespace the query with the callback and single result request. + // http://trac.elgg.org/ticket/4049 + $hash = (string)$callback . (int)$single . $query; // Is cached? if ($DB_QUERY_CACHE) { @@ -466,7 +465,6 @@ function elgg_query_runner($query, $callback = null, $single = false) { function insert_data($query) { global $CONFIG, $DB_QUERY_CACHE; - $query = elgg_format_query($query); elgg_log("DB query $query", 'NOTICE'); $dblink = get_db_link('write'); @@ -498,7 +496,6 @@ function insert_data($query) { function update_data($query) { global $CONFIG, $DB_QUERY_CACHE; - $query = elgg_format_query($query); elgg_log("DB query $query", 'NOTICE'); $dblink = get_db_link('write'); @@ -529,7 +526,6 @@ function update_data($query) { function delete_data($query) { global $CONFIG, $DB_QUERY_CACHE; - $query = elgg_format_query($query); elgg_log("DB query $query", 'NOTICE'); $dblink = get_db_link('write'); |