From 4416943e5d682c212b7a15b2f71d9b6c5d3f3e1f Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 23 Feb 2006 06:14:27 +0000 Subject: Fixing #65 --- framework/DataAccess/TAdodbProvider.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/DataAccess') diff --git a/framework/DataAccess/TAdodbProvider.php b/framework/DataAccess/TAdodbProvider.php index 9c63b20b..d4b6cf30 100644 --- a/framework/DataAccess/TAdodbProvider.php +++ b/framework/DataAccess/TAdodbProvider.php @@ -30,7 +30,7 @@ class TAdodbProvider extends TDatabaseProvider private $_cachedir=''; private $_fetchMode = 'associative'; - private $_hasImported=false; + private static $_hasImported=false; private $_adodbLibrary=''; @@ -62,16 +62,16 @@ class TAdodbProvider extends TDatabaseProvider public function setAdodbLibrary($path) { - $this->_adodbLibrary = $path; + $this->_adodbLibrary = Prado::getPathOfNamespace($path); } public function importAdodbLibrary() { - if(!$this->_hasImported || !class_exists('ADONewConnection')) + if(!self::$_hasImported) { require($this->getAdodbLibrary().'/adodb-exceptions.inc.php'); require($this->getAdodbLibrary().'/adodb.inc.php'); - $this->_hasImported = true; + self::$_hasImported = true; } } @@ -250,6 +250,7 @@ class TAdodbConnection extends TDbConnection if($this->getIsClosed()) { $provider = $this->getProvider(); + $provider->importAdodbLibrary(); if(strlen($provider->getConnectionString()) < 1) { if(strlen($provider->getDriver()) < 1) -- cgit v1.2.3