XPressME Integration Kit

Trac

Changeset 68


Ignore:
Timestamp:
Jan 27, 2009, 8:39:33 AM (15 years ago)
Author:
toemon
Message:

xmlrpc.phpがコールされたことを判断する関数 is_xmlrpc_call()を追加
(デバック用のコード追加)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/include_xoops_define.php

    r67 r68  
    4545} 
    4646 
     47function is_xmlrpc_call(){ 
     48 
     49        $xpress_root_index = basename(dirname(dirname( __FILE__ ))) . '/xmlrpc.php'; 
     50        $php_script_name = $_SERVER['SCRIPT_NAME']; 
     51        if(strstr($php_script_name,$xpress_root_index) !== false) $ret = true; else  $ret = false; 
     52        $xmlrpc_debug = 0; 
     53         
     54 
     55        if ($xmlrpc_debug) { 
     56                $_debug_file = './wp-content/debug.log'; 
     57                $log_data = ''; 
     58                $log_data .= 'is_xmlrpc_call()***********************************************************************'. "\n"; 
     59                if ($ret) $ret_val = 'true'; else $ret_val = 'false'; 
     60                $log_data .= 'return value = ' . $ret_val . "\n"; 
     61                 
     62                foreach($_SERVER as $key => $value){ 
     63                        $log_data .= $key . ' = ' . $value . "\n"; 
     64                } 
     65 
     66                $_fp = fopen($_debug_file, 'a'); 
     67                fwrite($_fp, $log_data); 
     68                fwrite($_fp, "\n\n"); 
     69                fclose($_fp);            
     70        } 
     71        return $ret; 
     72} 
     73 
    4774if (is_media_upload_page_call() ){ 
    4875        if ( !defined("XOOPS_ROOT_PATH") ) { 
Note: See TracChangeset for help on using the changeset viewer.