Index: trunk/wp-config.php
===================================================================
--- trunk/wp-config.php	(revision 92)
+++ trunk/wp-config.php	(revision 95)
@@ -5,6 +5,9 @@
 require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
 
-mb_language('Japanese');
-mb_internal_encoding('UTF-8');
+
+if (function_exists("mb_language")) mb_language('Japanese');
+// The setting of mb_internal_encoding might be unnecessary. 
+// Because mb_internal_encoding setting wp-setting.php line 484
+if (function_exists("mb_internal_encoding")) mb_internal_encoding('UTF-8');
 
 // ** MySQL settings ** //
@@ -16,4 +19,6 @@
 define('DB_COLLATE', '');
 
+//define('WP_DEBUG' ,true);
+
 // Change each KEY to a different unique phrase.  You won't have to remember the phrases later,
 // so make them long and complicated.  You can visit http://api.wordpress.org/secret-key/1.1/
@@ -24,9 +29,5 @@
 
 // You can have multiple installations in one database if you give each a unique prefix
-$xp_prefix = basename(dirname(__FILE__));
-if ($xp_prefix == 'wordpress'){
- 	$xp_prefix = 'wp';
-}
-$table_prefix  = $xoops_config->xoops_db_prefix . '_' . $xp_prefix . '_';   // Only numbers, letters, and underscores please!
+$table_prefix  = $xoops_config->module_db_prefix;   // Only numbers, letters, and underscores please!
 
 // Change this to localize WordPress.  A corresponding MO file for the
@@ -40,7 +41,17 @@
 if ( !defined('ABSPATH') )
 	define('ABSPATH', dirname(__FILE__).'/');
-require_once(ABSPATH.'wp-settings.php');
-require dirname( __FILE__ ).'/include/include_xoops_define.php' ;
-if (is_xpress_index_page_call()){
+
+require_once dirname( __FILE__ ).'/include/request_url.php' ;
+if (!is_xpress_index_page_call()){
+//	if ( is_wp_cron_page_call()){
+//		if ( !defined("XOOPS_ROOT_PATH") ) {
+//			require_once $xoops_config->xoops_mainfile_path;
+//		}
+//	}
+	require_once(ABSPATH.'wp-settings.php');
+} else {
+	// If $xoops_config->xoops_mainfile_path is not executed before wp-settings.php is executed, log in cannot be done. 
+	require_once $xoops_config->xoops_mainfile_path;
+	require_once(ABSPATH.'wp-settings.php');
 	// The return to wp-blog-header.php is stolen here
 	wp();
@@ -52,5 +63,5 @@
 	xpress_render($wp_output);
 	require_once( ABSPATH .'/include/xpress_breadcrumbs.php' );
-	include XOOPS_ROOT_PATH . '/footer.php';
+	include $xoops_config->xoops_root_path . '/footer.php';
 	exit();
 }
