From 6698601d191bb4b6592a5bd6f65bf147c7f524a2 Mon Sep 17 00:00:00 2001 From: Dmitry Simushev Date: Tue, 8 Nov 2011 17:29:33 +0000 Subject: [PATCH] Added wrapper function for mysql_close --- src/messenger/webim/libs/common.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index c688639f..43c53e77 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -363,6 +363,14 @@ function connect() return $link; } +function close_connection($link) +{ + global $use_persistent_connection; + if (! $use_persistent_connection) { + mysql_close($link); + } +} + function perform_query($query, $link) { mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));