summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/DataAccess/TAdodbProvider.php9
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php2
2 files changed, 6 insertions, 5 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)
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index 8d4de13e..929ee297 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -224,7 +224,7 @@ class TDatePicker extends TTextBox
*/
public function setUpToYear($value)
{
- $this-setViewState('UpToYear', TPropertyValue::ensureInteger($value), intval(@date('Y'))+10);
+ $this->setViewState('UpToYear', TPropertyValue::ensureInteger($value), intval(@date('Y'))+10);
}
/**