From 0a18a2df3f21f99c1e013723c434cfff76b2ab88 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Wed, 21 Feb 2007 14:57:05 +0000 Subject: implemented config argument home of constructor --- dbi.class | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbi.class b/dbi.class index c6469fe..961cd8f 100644 --- a/dbi.class +++ b/dbi.class @@ -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"; -- cgit v1.2.3