- Timestamp:
- Mar 30, 2010, 4:41:07 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r565 r567 48 48 function xpress_is_multiblog_root() { 49 49 global $blog_id; 50 if ( xpress_is_multiblog() && $blog_id == 1){50 if ( xpress_is_multiblog() && $blog_id == BLOG_ID_CURRENT_SITE){ 51 51 return true; 52 52 } else { -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r563 r567 158 158 global $xoops_db, $blog_id; 159 159 160 if (empty($blog_id)) $blog_id = 1; 160 if (empty($blog_id)) { 161 if (defined(BLOG_ID_CURRENT_SITE)){ 162 $blog_id = BLOG_ID_CURRENT_SITE; 163 } else { 164 $blog_id = 1; 165 } 166 } 161 167 $table = get_wp_prefix() . 'group_role'; 162 168 … … 165 171 } 166 172 167 function GroupeRoleCheck($blog_id = 1) {173 function GroupeRoleCheck($blog_id = 0) { 168 174 global $xoops_db; 169 175 170 if (empty($blog_id)) $blog_id = 1; 176 if (empty($blog_id)) { 177 if (defined(BLOG_ID_CURRENT_SITE)){ 178 $blog_id = BLOG_ID_CURRENT_SITE; 179 } else { 180 $blog_id = 1; 181 } 182 } 171 183 172 184 $module_id = get_xpress_modid(); … … 256 268 global $xoops_db, $blog_id; 257 269 258 if (empty($blog_id)) $blog_id = 1; 270 if (empty($blog_id)) { 271 if (defined(BLOG_ID_CURRENT_SITE)){ 272 $blog_id = BLOG_ID_CURRENT_SITE; 273 } else { 274 $blog_id = 1; 275 } 276 } 259 277 foreach ( (array) $post_data as $index_key => $value ){ 260 278 if (preg_match('/^ch_/',$index_key)){ // case ch_ … … 829 847 $wordpress_dir = ABSPATH ; 830 848 $xoops_dir = $xoops_config->xoops_upload_path . '/'; 831 if (xpress_is_multiblog() && $blog_id <> 1){849 if (xpress_is_multiblog() && $blog_id <> BLOG_ID_CURRENT_SITE){ 832 850 $wordpress_base_url = $xoops_config->module_url; 833 851 } else { … … 842 860 $uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]); 843 861 844 if (xpress_is_multiblog() && $blog_id <> 1){862 if (xpress_is_multiblog() && $blog_id <> BLOG_ID_CURRENT_SITE){ 845 863 $pat = str_replace ($xoops_dir, '', $uploads[path]); 846 864 $pat = preg_replace('/files.*/', '', $pat);
Note: See TracChangeset
for help on using the changeset viewer.