Index: trunk/xpressme_integration_kit/include/oninstall.php
===================================================================
--- trunk/xpressme_integration_kit/include/oninstall.php	(revision 842)
+++ trunk/xpressme_integration_kit/include/oninstall.php	(revision 852)
@@ -47,13 +47,13 @@
 	global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed;
 	global $xoops_config;
-		
+
 	define("WP_INSTALLING", true);
 	define('WP_FIRST_INSTALL', true); // For WPMU2.8
-	
+
 	$site_url= XOOPS_URL."/modules/".$mydirname;
 	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
 	$path = $mydirpath . '/';
 	$site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME;
-	
+
 // permission and wordpress files check
 	require_once ($path . 'include/pre_check.php');
@@ -66,5 +66,5 @@
 		return false;
 	}
-	
+
 // install WordPress
 	if (file_exists($path . 'wp-load.php')) {
@@ -77,12 +77,12 @@
 	make_db_current_silent();
 	$ret[] = "The data base of wordpress was made by prefix $table_prefix.<br />";
-	
+
 	$option_desc = __('WordPress web address');
-	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");	
+	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");
 	$wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')");
 
 	populate_options();
 	populate_roles();
-	
+
 // create XPressME table
 	$xp_prefix = preg_replace('/wordpress/','wp',$mydirname);
@@ -104,5 +104,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$views_table table of XPressME was made.<br />";
-	
+
 	$d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ;
 	$views_queries ="CREATE TABLE $d3forum_link (
@@ -116,5 +116,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$d3forum_link table of XPressME was made.<br />";
-	
+
 	$group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ;
 	$views_queries ="CREATE TABLE $group_role (
@@ -130,5 +130,5 @@
 	dbDelta($views_queries);
 	$ret[] = "$group_role table of XPressME was made.<br />";
-	
+
 	$notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ;
 	$queries ="CREATE TABLE $notify_reserve (
@@ -143,5 +143,5 @@
   		omit_user_id varchar(20) NOT NULL default '' ,
   		KEY notify_reserve_id (notify_reserve_id)
-		)TYPE=MyISAM";
+		)$charset_collate;";
 	dbDelta($queries);
 	$ret[] = "$notify_reserve table of XPressME was made.<br />";
@@ -149,9 +149,9 @@
 	$sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')";
 	$wpdb->query($sql);
-	
+
 // make templates
 	include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ;
 	$t_mess = xpress_templates_make($mid,$mydirname);
-	
+
 // Admin User Data write
 	// Change uid field
@@ -160,7 +160,7 @@
 	$email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com';
 	$pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):'';
-	
+
 	add_filter('sanitize_user', "sanitize_user_multibyte" ,10,3);
-	
+
 	if (!function_exists('username_exists')){
 		require_once($mydirpath . '/wp-includes/registration-functions.php');
@@ -177,12 +177,12 @@
 	$user->set_role('administrator');
 	'User ' . $user_name . ' of the administrator was made.';
-	// over write xoops md5 password 
+	// over write xoops md5 password
 	$sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id";
 	$wpdb->query($sql);
 	$ret[] = 'The password of XOOPS was copied.<br />';
-	
-	
+
+
 // Set Default data
-	// make WordPress Default data	
+	// make WordPress Default data
 	if (function_exists('wp_install_defaults')){
 		wp_install_defaults($user_id);
@@ -190,12 +190,12 @@
 		wp_install_old_defaults($user_id);
 	}
-	
+
 	$ret[] = 'The first sample post & comment was written.<br />';
-	
+
 	// Rewrite Option for Xpress
 	$xoops_config_tbl = XOOPS_DB_PREFIX . '_config' ;
 	$sql = "SELECT conf_value FROM  $xoops_config_tbl WHERE `conf_name` = 'default_TZ'";
 	$xoops_default_TZ = $wpdb->get_var($sql);
-	update_option('gmt_offset', $xoops_default_TZ);	
+	update_option('gmt_offset', $xoops_default_TZ);
 
 	if (WPLANG == 'ja_EUC') {
@@ -208,5 +208,5 @@
 	update_option("blog_charset", $setup_charset);
 
-	update_option('blogname', $site_name );	
+	update_option('blogname', $site_name );
 	update_option('blogdescription', 'WordPress for XOOPS');
 	update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']);
@@ -217,5 +217,5 @@
 	update_option('default_pingback_flag', 0);
 	$ret[] = 'The initial data was written in the data base of wordpress.<br />';
-	
+
 	update_option("template", "xpress_default");
 	update_option("stylesheet", "xpress_default");
@@ -223,5 +223,5 @@
 //	update_option('uploads_use_yearmonth_folders', 1);
 	update_option('upload_path', 'wp-content/uploads');
-			
+
 // activate the xpressme plugin
 	require_once dirname( __FILE__ ).'/xpress_active_plugin.php';
