Index: branches/Ver3.0/xpressme_integration_kit/include/data.inc.php
===================================================================
--- branches/Ver3.0/xpressme_integration_kit/include/data.inc.php	(revision 749)
+++ branches/Ver3.0/xpressme_integration_kit/include/data.inc.php	(revision 757)
@@ -31,13 +31,11 @@
 	global $xoopsDB;
 
+	$module_handler =& xoops_gethandler('module');
+	$module =& $module_handler->getByDirname($mydirname);
+	$module_id = $module->getVar('mid');
+	
 	$wp_prefix = preg_replace('/wordpress/','wp',$mydirname);
 	require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php');
 	include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php');
-
-	$modules_table = $xoopsDB->prefix('modules');
-	$modSQL ="SELECT mid FROM " . $modules_table . " WHERE dirname LIKE '" . $mydirname . "'";
-	$modRes = $xoopsDB->query($modSQL, 0, 0);
-	$modRow = $xoopsDB->fetchArray($modRes);
-	$module_id = $modRow['mid'];
 
 	$table_config = $xoopsDB->prefix('config');
