Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1973)
+++ branches/2.8.x/CHANGELOG	(revision 1974)
@@ -11,6 +11,8 @@
 ! = Update/Change
 ===============================================================================
 
+04 Oct-2013 Build 1974 Manuela v.d.Decken(DarkViper)
+! /framework/WbDatabase  fixed little problem with multiple database connections
 03 Oct-2013 Build 1973 Manuela v.d.Decken(DarkViper)
 ! /update-script.php last correction for loading PasswordHash packet
 # -- Typo fix line 87
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1973)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1974)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1973');
+if(!defined('REVISION')) define('REVISION', '1974');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/WbDatabase.php
===================================================================
--- branches/2.8.x/wb/framework/WbDatabase.php	(revision 1973)
+++ branches/2.8.x/wb/framework/WbDatabase.php	(revision 1974)
@@ -40,6 +40,7 @@
 
 	private $_db_handle  = null; // readonly from outside
 	private $_db_name    = '';
+	private $_sInstanceIdentifier = '';
 	protected $sTablePrefix = '';
 	protected $sCharset     = '';
 	protected $connected    = false;
@@ -59,7 +60,9 @@
 	public static function getInstance($sIdentifier = 'core') {
 		if( !isset(self::$_oInstances[$sIdentifier])) {
             $c = __CLASS__;
-            self::$_oInstances[$sIdentifier] = new $c;
+			$oInstance = new $c;
+			$oInstance->_sInstanceIdentifier = $sIdentifier;
+            self::$_oInstances[$sIdentifier] = $oInstance;
 		}
 		return self::$_oInstances[$sIdentifier];
 	}
@@ -83,6 +86,7 @@
  * Example for SQL-Url:  'mysql://user:password@demo.de[:3306]/datenbank'
  */
 	public function doConnect($url = '') {
+		if($this->connected) { return $this->connected; } // prevent from reconnecting
 		$this->connected = false;
 		if($url != '') {
 			$aIni = parse_url($url);
@@ -137,12 +141,12 @@
 
 	// Disconnect from the database
 	public function disconnect() {
-		if($this->connected==true) {
+		if($this->connected == true && $oInstance->_sInstanceIdentifier != 'core' ) {
 			mysql_close($this->_db_handle);
+			$this->connected = false;
 			return true;
-		} else {
-			return false;
 		}
+		return false;
 	}
 
 	// Run a query
@@ -227,6 +231,7 @@
 			case 'getTablePrefix':
 				$retval = $this->sTablePrefix;			
 				break;
+			case 'QueryCount':
 			case 'getQueryCount':
 				$retval = $this->iQueryCount;
 				break;
