summaryrefslogtreecommitdiffstats
path: root/web/lib/cachefuncs.inc.php
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2013-02-03 16:26:29 +0000
committerLukas Fleischer <archlinux@cryptocrack.de>2013-02-10 12:10:38 +0100
commit8d6c872297459ceb463ed496968cc7cea32274a8 (patch)
tree2e1e5e07459f7ce62be0dccf26609bef4b2ad873 /web/lib/cachefuncs.inc.php
parent8e03e68d687015b5cd8c9d3857e1a1d007252afa (diff)
downloadaurweb-8d6c872297459ceb463ed496968cc7cea32274a8.tar.xz
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 <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/cachefuncs.inc.php')
-rw-r--r--web/lib/cachefuncs.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/lib/cachefuncs.inc.php b/web/lib/cachefuncs.inc.php
index f109bcf..d558be4 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) {