Index: trunk/include/include_xoops_define.php
===================================================================
--- trunk/include/include_xoops_define.php	(revision 60)
+++ trunk/include/include_xoops_define.php	(revision 62)
@@ -36,6 +36,16 @@
 }
 
-if (is_admin_page_call()){
-	if ( !defined("XOOPS_ROOT_PATH") ) {	
+function is_media_upload_page_call(){
+	$xpress_root_indexs[0] = basename(dirname(dirname( __FILE__ ))) . '/wp-admin/async-upload.php';
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	foreach ($xpress_root_indexs as $xpress_root_index) {
+		if (strstr($php_script_name,$xpress_root_index) !== false) return true;
+	}
+	return false;
+}
+
+//if (is_admin_page_call()){
+if (is_media_upload_page_call() ){
+	if ( !defined("XOOPS_ROOT_PATH") ) {
 //		define('_LEGACY_PREVENT_LOAD_CORE_', 1);		//Module process will not load any XOOPS Cube classes.
 		define('_LEGACY_PREVENT_EXEC_COMMON_', 1);	
