diff options
author | Nathan Gass | 2007-02-21 14:57:05 +0000 |
---|---|---|
committer | Nathan Gass | 2007-02-21 14:57:05 +0000 |
commit | 0a18a2df3f21f99c1e013723c434cfff76b2ab88 (patch) | |
tree | c5582f39f1d6808a25d0d712d4978bcb0d5794cd | |
parent | c447d3e31b42f2612a7db46ee723b20ad069f38e (diff) | |
download | itools-0a18a2df3f21f99c1e013723c434cfff76b2ab88.tar.gz itools-0a18a2df3f21f99c1e013723c434cfff76b2ab88.tar.bz2 itools-0a18a2df3f21f99c1e013723c434cfff76b2ab88.zip |
implemented config argument home of constructor
-rw-r--r-- | dbi.class | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -59,7 +59,10 @@ function it_dbi($config, $query = null) unset($this->_defaultconfig); /* to shorten print_r() output */ if (!isset($this->_db)) - $this->_db = $GLOBALS['ULTRADB']; + if($config['home'] && ($site = it::match( "/www/([^/]+)", $config['home']))) + $this->_db = strtr( $site, ".-", "__" ); + else + $this->_db = $GLOBALS['ULTRADB']; $dbid = "$this->_db/$this->_server/$this->_user"; |