aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dba.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/dba.php b/include/dba.php
index 49b325cf7..32f1ac3ed 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -212,4 +212,13 @@ function dbesc_array(&$arr) {
if(is_array($arr) && count($arr)) {
array_walk($arr,'dbesc_array_cb');
}
-}} \ No newline at end of file
+}}
+
+
+if(! function_exists('closedb')) {
+function closedb() {
+ global $db;
+ if($db && $db->connected)
+ $db->close();
+}}
+