summaryrefslogtreecommitdiff
path: root/framework/DataAccess/TDatabaseProvider.php
diff options
context:
space:
mode:
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;
}