XPressME Integration Kit

Trac

Changeset 734


Ignore:
Timestamp:
May 9, 2011, 10:01:59 AM (14 years ago)
Author:
toemon
Message:

nocommonでXOOPSを取り込むスクリプトを複数設定できるように、配列で設定するようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver3.0/xpressme_integration_kit/include/add_xpress_config.php

    r733 r734  
    22//load XOOPS 
    33$request_method =  (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : ''; 
    4 $_SERVER['REQUEST_METHOD'] = 'POST';  // The xoops data base is opened in the mode that can be written.   
    5 if ( defined('WP_ADMIN') )       
    6         $php_script_name = $_SERVER['SCRIPT_NAME']; 
    7         if (strstr($php_script_name,'wp-admin/async-upload.php') !== false) { 
    8                  
    9         $xoopsOption['nocommon'] = 1; // The WP file uploading must work normally.   
     4//$_SERVER['REQUEST_METHOD'] = 'POST' is 
     5//When notifying by a private message, Notification_reserve_send(); 
     6//it is evaded that the data base becomes read-only as a result of the check on the referrer and the method.  
     7$_SERVER['REQUEST_METHOD'] = 'POST'; 
     8 
     9if ( defined('WP_ADMIN') )      { 
     10        $nocommon_scripts = array( 
     11                'wp-admin/async-upload.php', 
     12        ); 
     13        foreach($nocommon_scripts as $nocommon_script){ 
     14                if (strstr($_SERVER['SCRIPT_NAME'],$nocommon_script) !== false) { 
     15                        $xoopsOption['nocommon'] = 1; 
     16                        break; 
     17                } 
    1018        } 
     19} 
     20 
    1121require_once dirname(dirname(dirname(dirname( __FILE__ )))).'/mainfile.php' ; 
    1222$_SERVER['REQUEST_METHOD'] = $request_method; //It returns it to former data.  
Note: See TracChangeset for help on using the changeset viewer.