XPressME Integration Kit

Trac

Changeset 696


Ignore:
Timestamp:
Mar 29, 2011, 7:29:26 PM (13 years ago)
Author:
toemon
Message:

restore a session erased by wp_unregister_GLOBALS fixed#395

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/add_xpress_process.php

    r655 r696  
    114114require_once( dirname( __FILE__ ).'/request_url.php'); 
    115115require_once( dirname( __FILE__ ).'/memory_limit.php'); 
     116 
     117$global_session = $_SESSION; 
     118 
    116119if (is_xpress_index_page_call()){ 
    117120        //$_SERVER['REQUEST_METHOD'] = 'POST' is 
     
    124127        xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.) 
    125128        unset($offset);         //This Trap is provides the case where $offset is defined on the XOOPS side. 
     129         
    126130        require_once(ABSPATH.'wp-settings.php'); 
    127131         
    128132        //When it is not possible to connect it correctly at site home URL on the WordPress side,  
    129133        //URL is corrected based on accessed URL.  
     134 
    130135        global $xoopsUserIsAdmin; 
    131136        if ($xoopsUserIsAdmin) safe_site_url(); 
     
    135140        } 
    136141        wp(); 
    137          
    138142        //for Event notification update on single post to which link is changed by permalink 
    139143        if ( is_404() ) { 
     
    196200                set_xpress_block_header($xoops_config->module_name); 
    197201        } 
     202        if ( ini_get( 'register_globals' ) ) 
     203                $_SESSION = $global_session; //restore a session erased by wp_unregister_GLOBALS 
     204         
    198205        exit();         // The return to wp-blog-header.php is stolen here 
    199206} 
     
    201208if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;    // for Notification_triggerEvent 
    202209xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.) 
     210require_once(ABSPATH.'wp-settings.php'); 
     211if ( ini_get( 'register_globals' ) ) 
     212        $_SESSION = $global_session; //restore a session erased by wp_unregister_GLOBALS 
    203213?> 
Note: See TracChangeset for help on using the changeset viewer.