Index: /trunk/xpressme_integration_kit/include/onupdate.php
===================================================================
--- /trunk/xpressme_integration_kit/include/onupdate.php	(revision 473)
+++ /trunk/xpressme_integration_kit/include/onupdate.php	(revision 474)
@@ -42,6 +42,13 @@
 	$site_url= XOOPS_URL."/modules/".$mydirname;
 	xpress_put_siteurl($mydirname,$site_url);
-	xpress_put_home($mydirname,$site_url);
-
+	$home = get_xpress_option($mydirname,'home');
+	$home_check = 'home option is right';
+	if (strcmp($site_url,$home) !== 0 ){
+		if (!@fclose(@fopen($home . '/xoops_version.php', "r"))){
+			xpress_put_home($mydirname,$site_url);
+			$home_check = 'Change home option $home to $site_url';
+		}
+	}
+	$msgs[] = $home_check;
 // XPressME orignal table update
 	$t_mess = xpress_table_make($module , $mydirname);
@@ -101,4 +108,24 @@
 endif;
 
+if( ! function_exists( 'get_xpress_option' ) ) {
+	function get_xpress_option($mydirname,$option_name){
+		global $xoopsModule;
+		$wp_prefix = $mydirname;
+		if ($wp_prefix == 'wordpress'){
+			$wp_prefix = 'wp';
+		}
+		$xoopsDB =& Database::getInstance();
+		$option_table = $xoopsDB->prefix($wp_prefix . '_options');
+
+		$sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'";
+		
+		$result =  $xoopsDB->query($sql, 0, 0);
+		if ($xoopsDB->getRowsNum($result)  > 0){
+			$row = $xoopsDB->fetchArray($result);
+			return $row['option_value'];
+		}
+		return 0;
+	}
+}
 
 if( ! function_exists( 'xpress_message_append_onupdate' ) ) :
