XPressME Integration Kit

Trac

Changeset 209


Ignore:
Timestamp:
May 19, 2009, 7:36:46 PM (15 years ago)
Author:
toemon
Message:

WordPressMUであるかを判断するメンバー $is_wpmuを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/class/config_from_xoops.class.php

    r167 r209  
    3535        var $is_impress; 
    3636        var $impress_db_config_file; 
     37        var $is_wpmu; 
     38        var $mu_domain_current_site; 
     39        var $mu_path_current_site; 
    3740         
    3841         
     
    160163                 
    161164                $this->set_module_version(); 
    162                  
     165                $this->set_is_wpmu(); 
     166                $this->set_mu_current_site(); 
    163167    } 
    164168     
     
    190194    } 
    191195     
     196    function set_is_wpmu(){ 
     197        include dirname(dirname(__FILE__)) . '/wp-includes/version.php'; 
     198         
     199        if (empty($wpmu_version)) 
     200                $this->is_wpmu  = false; 
     201        else 
     202                $this->is_wpmu  = true; 
     203    } 
     204     
     205    function set_mu_current_site(){ 
     206        $pattern = 'http:\/\/([^\/]*).*'; 
     207        if (preg_match('/' . $pattern . '/' ,$this->xoops_url,$matchs)){ 
     208                                $this->mu_domain_current_site = $matchs[1]; 
     209                } 
     210                 
     211        $pattern = 'http:\/\/[^\/]*(\/.*)'; 
     212        if (preg_match('/' . $pattern . '/' ,$this->module_url,$matchs)){ 
     213                                $this->mu_path_current_site = $matchs[1] . '/'; 
     214                } 
     215    } 
     216     
    192217} 
    193218?> 
Note: See TracChangeset for help on using the changeset viewer.