summaryrefslogtreecommitdiff
path: root/framework/DataAccess/TDatabaseProvider.php
diff options
context:
space:
mode:
authorwei <>2006-07-28 12:32:01 +0000
committerwei <>2006-07-28 12:32:01 +0000
commit623447ffea7a49359c773a0bc3a851397885f319 (patch)
tree93676acdeea5697dd00fb10d0eb70948901b549e /framework/DataAccess/TDatabaseProvider.php
parentfbf05a159bc1a688940c16dc304eaaf140188b01 (diff)
Add sqlite support for time-tracker.
Diffstat (limited to 'framework/DataAccess/TDatabaseProvider.php')
-rw-r--r--framework/DataAccess/TDatabaseProvider.php11
1 files changed, 7 insertions, 4 deletions
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 <tt>sqlite</tt>, the host must be dot path to the sqlite
- * file. E.g. "<tt>Application.pages.my_db</tt>". The database filename
- * should not contain any dots.
+ * If the driver is <tt>sqlite</tt>, the host must be dot directory of to
+ * the sqlite file. E.g. "<tt>Application.pages.my_db</tt>". The database
+ * filename must be specified by the <tt>Database</tt> 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;
}