Index: /trunk/include/include_xoops_define.php
===================================================================
--- /trunk/include/include_xoops_define.php	(revision 66)
+++ /trunk/include/include_xoops_define.php	(revision 67)
@@ -45,12 +45,10 @@
 }
 
-//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);	
+		//Module process will not load any XOOPS Cube classes.
+		define('_LEGACY_PREVENT_EXEC_COMMON_', 1);		// for XCL
+		$xoopsOption['nocommon'] = 1;					// for XOOPS
 		include_once dirname( __FILE__ ).'/../../../mainfile.php';
-		$root=&XCube_Root::getSingleton();
-		$root->mController->executeCommonSubset();
 	}
 	if (!defined("XOOPS_UPLOAD_PATH"))
