Index: trunk/xpressme_integration_kit/class/wpConfigInfo_class.php
===================================================================
--- trunk/xpressme_integration_kit/class/wpConfigInfo_class.php	(revision 784)
+++ trunk/xpressme_integration_kit/class/wpConfigInfo_class.php	(revision 785)
@@ -30,6 +30,5 @@
     {
 		global $xoopsModule;
-		$this->xoops_db_prefix = XOOPS_DB_PREFIX .'_';
-		$this->db_prefix = $this->_get_wp_db_prefix();
+		$this->xoops_db_prefix = XOOPS_DB_PREFIX . '_';
 		$this->db_name = XOOPS_DB_NAME;
 		$this->db_user = XOOPS_DB_USER;
@@ -37,4 +36,5 @@
 		$this->db_host = XOOPS_DB_HOST;
 		if(!defined('XOOPS_DB_NAME') ) $this->_get_resource_db_ini();
+		$this->db_prefix = $this->_get_wp_db_prefix();
 		$this->db_salt = (defined('XOOPS_DB_SALT')) ? XOOPS_DB_SALT : '';
 		require_once dirname( __FILE__ ).'/langInfo_class.php' ;
@@ -43,5 +43,5 @@
 	function _get_wp_db_prefix(){
 		$module_name = basename(dirname(dirname(__FILE__)));
-    	$module_db_prefix = XOOPS_DB_PREFIX . '_' . preg_replace('/wordpress/','wp',$module_name) . '_';
+    	$module_db_prefix = $this->xoops_db_prefix . preg_replace('/wordpress/','wp',$module_name) . '_';
     	return $module_db_prefix;
 	}
@@ -63,5 +63,5 @@
 				$this->db_pass = $matchs[1];
 			if (preg_match('/^\s*prefix\s*=\s*[\'"](.*)[\'"]/' ,$line,$matchs))
-				$this->db_prefix = $matchs[1];
+				$this->xoops_db_prefix = $matchs[1].'_';
 		}
 	}
@@ -70,6 +70,11 @@
 		return $this->xoops_db_prefix;
 	}
-	function get_db_prefix(){
-		return $this->db_prefix;
+	function get_db_prefix($module_dirname){
+		if (empty($module_dirname)){
+			return $this->db_prefix;
+		} else {
+    		$module_db_prefix = $this->xoops_db_prefix . preg_replace('/wordpress/','wp',$module_dirname) . '_';
+    		return $module_db_prefix;		
+		}
 	}
 	function get_wp_db_prefix(){
