XPressME Integration Kit

Trac


Ignore:
Timestamp:
May 28, 2009, 2:53:42 PM (15 years ago)
Author:
toemon
Message:

fixed#135 アップロードパスを年月ベースにすると、画像アップロードされないバグ修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php

    r235 r246  
    780780                        $xoops_upload_url = $xoops_config->xoops_upload_url; 
    781781                         
     782                        @rmdir($uploads[path]);  //remove wordpress side uploads_dir  
     783                         
    782784                        $uploads[path] =  str_replace ($wordpress_dir, $xoops_dir, $uploads[path]); 
    783785                        $uploads[basedir] = str_replace ($wordpress_dir, $xoops_dir, $uploads[basedir]); 
    784786                        $uploads[url] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[url]); 
    785787                        $uploads[baseurl] = str_replace ($wordpress_base_url, $xoops_upload_url, $uploads[baseurl]); 
     788                         
     789                        // Make sure we have an uploads dir 
     790                        if ( ! wp_mkdir_p( $uploads[path] ) ) { 
     791                                $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $uploads[path] ); 
     792                                return array( 'error' => $message ); 
     793                        } 
    786794                } 
    787795                return $uploads; 
Note: See TracChangeset for help on using the changeset viewer.