From 623447ffea7a49359c773a0bc3a851397885f319 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 28 Jul 2006 12:32:01 +0000 Subject: Add sqlite support for time-tracker. --- framework/DataAccess/TDatabaseProvider.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'framework/DataAccess/TDatabaseProvider.php') diff --git a/framework/DataAccess/TDatabaseProvider.php b/framework/DataAccess/TDatabaseProvider.php index 067c7243..88c78505 100644 --- a/framework/DataAccess/TDatabaseProvider.php +++ b/framework/DataAccess/TDatabaseProvider.php @@ -103,16 +103,19 @@ abstract class TDatabaseProvider extends TModule } /** - * If the driver is sqlite, the host must be dot path to the sqlite - * file. E.g. "Application.pages.my_db". The database filename - * should not contain any dots. + * If the driver is sqlite, the host must be dot directory of to + * the sqlite file. E.g. "Application.pages.my_db". The database + * filename must be specified by the Database attribute. * @return string database host name/IP (and port number) in the format * "host[:port]" */ public function getHost() { if(strtolower($this->getDriver()) == "sqlite") - return Prado::getPathOfNamespace($this->_host); + { + $dir = Prado::getPathOfNamespace($this->_host); + return $dir.'/'.$this->getDatabase(); + } else return $this->_host; } -- cgit v1.2.3