Index: trunk/xpressme_integration_kit/include/onupdate.php
===================================================================
--- trunk/xpressme_integration_kit/include/onupdate.php	(revision 352)
+++ trunk/xpressme_integration_kit/include/onupdate.php	(revision 384)
@@ -15,4 +15,5 @@
 		$root =& XCube_Root::getSingleton();
 		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'xpress_message_append_onupdate' ) ;
+		$root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Fail', 'xpress_message_append_onupdate' ) ;
 		$msgs = array() ;
 	} else {
@@ -22,4 +23,6 @@
 	$db =& Database::getInstance() ;
 	$mid = $module->getVar('mid') ;
+	
+
 
 //XPressME Update
@@ -28,5 +31,12 @@
 	$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
 	$path = $mydirpath . '/';
-	
+
+// permission and wordpress files check
+	require_once ($path . 'include/pre_check.php');
+	if(! xp_permission_check($mydirname, $mydirpath)){
+		$msgs = $GLOBALS["err_log"];
+		return false;
+	}
+
 //Site_url and home of an optional table are repaired. 
 	$site_url= XOOPS_URL."/modules/".$mydirname;
