Changeset 209 for trunk/class
- Timestamp:
- May 19, 2009, 7:36:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/config_from_xoops.class.php
r167 r209 35 35 var $is_impress; 36 36 var $impress_db_config_file; 37 var $is_wpmu; 38 var $mu_domain_current_site; 39 var $mu_path_current_site; 37 40 38 41 … … 160 163 161 164 $this->set_module_version(); 162 165 $this->set_is_wpmu(); 166 $this->set_mu_current_site(); 163 167 } 164 168 … … 190 194 } 191 195 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 192 217 } 193 218 ?>
Note: See TracChangeset
for help on using the changeset viewer.