From b3d7a7a124623eebdefae53aea46f9f79bdabc65 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 7 Sep 2012 14:34:39 +0000 Subject: [PATCH] Fixed ability to use persistent database connection with an object of the Database class --- src/messenger/webim/libs/classes/database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messenger/webim/libs/classes/database.php b/src/messenger/webim/libs/classes/database.php index c838e6f9..aeae25dc 100644 --- a/src/messenger/webim/libs/classes/database.php +++ b/src/messenger/webim/libs/classes/database.php @@ -183,7 +183,8 @@ Class Database{ $instance->dbh = new PDO( "mysql:host={$instance->dbHost};dbname={$instance->dbName}", $instance->dbLogin, - $instance->dbPass + $instance->dbPass, + array(PDO::ATTR_PERSISTENT => $instance->usePersistentConnection) ); if ($instance->forceCharsetInConnection) {