- Timestamp:
- Mar 30, 2010, 1:33:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r558 r563 306 306 307 307 global $xoops_config; 308 if(xpress_is_multiblog()) $this->is_use_xoops_upload_path = false;309 308 310 309 $table = get_wp_prefix() . 'group_role'; … … 825 824 { 826 825 global $xoops_config; 826 global $blog_id,$blogname; 827 827 828 if ($this->is_use_xoops_upload_path){ 828 829 $wordpress_dir = ABSPATH ; 829 830 $xoops_dir = $xoops_config->xoops_upload_path . '/'; 830 $wordpress_base_url = get_option( 'siteurl' ); 831 if (xpress_is_multiblog() && $blog_id <> 1){ 832 $wordpress_base_url = $xoops_config->module_url; 833 } else { 834 $wordpress_base_url = get_option( 'siteurl' ); 835 } 831 836 $xoops_upload_url = $xoops_config->xoops_upload_url; 832 833 @rmdir($uploads[path]); //remove wordpress side uploads_dir 837 // @rmdir($uploads[path]); //remove wordpress side uploads_dir 834 838 835 839 $uploads[path] = str_replace ($wordpress_dir, $xoops_dir, $uploads[path]); … … 837 841 $uploads[url] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[url]); 838 842 $uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]); 843 844 if (xpress_is_multiblog() && $blog_id <> 1){ 845 $pat = str_replace ($xoops_dir, '', $uploads[path]); 846 $pat = preg_replace('/files.*/', '', $pat); 847 $pat = str_replace ('/', '\/', $pat); 848 $uploads[path] = preg_replace('/' . $pat . '/', $blogname . '/',$uploads[path]); 849 850 $pat = str_replace ($xoops_dir, '', $uploads[basedir]); 851 $pat = preg_replace('/files.*/', '', $pat); 852 $pat = str_replace ('/', '\/', $pat); 853 $uploads[basedir] = preg_replace('/' . $pat . '/', $blogname . '/',$uploads[basedir]); 854 } 839 855 840 856 // Make sure we have an uploads dir
Note: See TracChangeset
for help on using the changeset viewer.