Make WordPress Core

Ticket #2271: 2271.diff

File 2271.diff, 2.5 KB (added by davidhouse, 19 years ago)

Just drop fileupload_url

  • wp-includes/functions-post.php

     
    877877// Returns an array containing the current upload directory's path and url, or an error message.
    878878function wp_upload_dir() {
    879879        $siteurl = get_settings('siteurl');
    880         //prepend ABSPATH to $dir and $siteurl to $url if they're not already there
     880        //prepend ABSPATH to $dir if it's not already there
    881881        $dir = ABSPATH . str_replace(ABSPATH, '', trim(get_settings('fileupload_realpath')));
    882         $url = $siteurl . str_replace($siteurl, '', trim(get_settings('fileupload_url')));
    883882
    884883        if ( $dir == ABSPATH ) { //the option was empty
    885884                $dir = ABSPATH . 'wp-content/uploads';
    886885        }
    887         if ( $url == $siteurl ) { //the option was empty
    888                 $url = get_option('siteurl') . '/' . str_replace(ABSPATH, '', $dir);
    889         }
    890 
     886       
     887        $url = get_option('siteurl') . '/' . str_replace(ABSPATH, '', $dir);
     888       
    891889        if ( defined('UPLOADS') ) {
    892890                $dir = ABSPATH . UPLOADS;
    893891                $url =  get_option('siteurl') . '/' . UPLOADS;
  • wp-admin/upgrade-schema.php

     
    223223        // 2.1
    224224        add_option('uploads_use_yearmonth_folders', 1);
    225225        add_option('fileupload_realpath', ABSPATH . 'wp-content/uploads');
    226         add_option('fileupload_url', ''); //if this is empty it will be obtained from fileupload_realpath
    227226       
    228227        // Delete unused options
    229228        $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog');