From 8d6c872297459ceb463ed496968cc7cea32274a8 Mon Sep 17 00:00:00 2001 From: canyonknight Date: Sun, 3 Feb 2013 16:26:29 +0000 Subject: Remove unnecessary database connection parameter from all functions All functions now have a database connection method that will use the same database connection. This imitates the functionality of passing a database connection as an argument and makes it redundant. Signed-off-by: canyonknight Signed-off-by: Lukas Fleischer --- web/lib/cachefuncs.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/lib/cachefuncs.inc.php') diff --git a/web/lib/cachefuncs.inc.php b/web/lib/cachefuncs.inc.php index f109bcff..d558be44 100644 --- a/web/lib/cachefuncs.inc.php +++ b/web/lib/cachefuncs.inc.php @@ -67,7 +67,8 @@ function get_cache_value($key, &$status=false) { # Run a simple db query, retrieving and/or caching the value if APC is # available for use. Accepts an optional TTL value (defaults to 600 seconds). -function db_cache_value($dbq, $dbh, $key, $ttl=600) { +function db_cache_value($dbq, $key, $ttl=600) { + $dbh = DB::connect(); $status = false; $value = get_cache_value($key, $status); if (!$status) { -- cgit v1.2.3-24-g4f1b