Index: trunk/include/include_xoops_define.php
===================================================================
--- trunk/include/include_xoops_define.php	(revision 67)
+++ trunk/include/include_xoops_define.php	(revision 68)
@@ -45,4 +45,31 @@
 }
 
+function is_xmlrpc_call(){
+
+	$xpress_root_index = basename(dirname(dirname( __FILE__ ))) . '/xmlrpc.php';
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	if(strstr($php_script_name,$xpress_root_index) !== false) $ret = true; else  $ret = false;
+	$xmlrpc_debug = 0;
+	
+
+	if ($xmlrpc_debug) {
+		$_debug_file = './wp-content/debug.log';
+		$log_data = '';
+		$log_data .= 'is_xmlrpc_call()***********************************************************************'. "\n";
+		if ($ret) $ret_val = 'true'; else $ret_val = 'false';
+		$log_data .= 'return value = ' . $ret_val . "\n";
+		
+		foreach($_SERVER as $key => $value){
+			$log_data .= $key . ' = ' . $value . "\n";
+		}
+
+		$_fp = fopen($_debug_file, 'a');
+		fwrite($_fp, $log_data);
+		fwrite($_fp, "\n\n");
+		fclose($_fp);		
+	}
+	return $ret;
+}
+
 if (is_media_upload_page_call() ){
 	if ( !defined("XOOPS_ROOT_PATH") ) {
