Ticket #2271: 2271.diff
File 2271.diff, 2.5 KB (added by , 19 years ago) |
---|
-
wp-includes/functions-post.php
877 877 // Returns an array containing the current upload directory's path and url, or an error message. 878 878 function wp_upload_dir() { 879 879 $siteurl = get_settings('siteurl'); 880 //prepend ABSPATH to $dir and $siteurl to $url if they'renot already there880 //prepend ABSPATH to $dir if it's not already there 881 881 $dir = ABSPATH . str_replace(ABSPATH, '', trim(get_settings('fileupload_realpath'))); 882 $url = $siteurl . str_replace($siteurl, '', trim(get_settings('fileupload_url')));883 882 884 883 if ( $dir == ABSPATH ) { //the option was empty 885 884 $dir = ABSPATH . 'wp-content/uploads'; 886 885 } 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 891 889 if ( defined('UPLOADS') ) { 892 890 $dir = ABSPATH . UPLOADS; 893 891 $url = get_option('siteurl') . '/' . UPLOADS; -
wp-admin/upgrade-schema.php
223 223 // 2.1 224 224 add_option('uploads_use_yearmonth_folders', 1); 225 225 add_option('fileupload_realpath', ABSPATH . 'wp-content/uploads'); 226 add_option('fileupload_url', ''); //if this is empty it will be obtained from fileupload_realpath227 226 228 227 // Delete unused options 229 228 $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');