summaryrefslogtreecommitdiff
path: root/framework/DataAccess/TAdodbProvider.php
diff options
context:
space:
mode:
authorwei <>2006-02-23 06:14:27 +0000
committerwei <>2006-02-23 06:14:27 +0000
commit4416943e5d682c212b7a15b2f71d9b6c5d3f3e1f (patch)
tree77d9708266f2e329533b4ad9d653b01df9700c88 /framework/DataAccess/TAdodbProvider.php
parent8569373e8cb6163f182fe13ffbc44ea1b2c961cd (diff)
Fixing #65
Diffstat (limited to 'framework/DataAccess/TAdodbProvider.php')
-rw-r--r--framework/DataAccess/TAdodbProvider.php9
1 files changed, 5 insertions, 4 deletions
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)