From 3ba6a1da1b0c7c685579df7d8d8eb496a6411db9 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 17 Mar 2010 13:53:36 +1300 Subject: [PATCH] Add support for persistent connections. --- inc/AwlQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/AwlQuery.php b/inc/AwlQuery.php index f54acc1a..af1167ec 100644 --- a/inc/AwlQuery.php +++ b/inc/AwlQuery.php @@ -29,7 +29,7 @@ require_once('AwlDatabase.php'); * - Simple syntax for iterating through a result set. * * This class is intended as a transitional mechanism for moving from the -* PostgreSQL-specific PgQuery class to something which uses PDO in a more +* PostgreSQL-specific Pg Query class to something which uses PDO in a more * replaceable manner. * */ @@ -71,7 +71,7 @@ function _awl_connect_configured_database() { if ( isset($matches[4]) && $matches[4] != '' ) $dbuser = $matches[4]; if ( isset($matches[6]) && $matches[6] != '' ) $dbpass = $matches[6]; } - if ( $_awl_dbconn = new AwlDatabase( $dsn, $dbuser, $dbpass ) ) break; + if ( $_awl_dbconn = new AwlDatabase( $dsn, $dbuser, $dbpass, (isset($c->use_persistent) && $c->use_persistent ? array(PDO::ATTR_PERSISTENT => true) : null) ) ) break; } if ( ! $_awl_dbconn ) {