diff options
-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"; |