[wp-trac] [WordPress Trac] #4243: Properly handle uploaded files
for blogroll imports
WordPress Trac
wp-trac at lists.automattic.com
Thu May 10 17:15:11 GMT 2007
#4243: Properly handle uploaded files for blogroll imports
----------------------------+-----------------------------------------------
Reporter: apokalyptik | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.4
Component: Administration | Version:
Severity: normal | Keywords:
----------------------------+-----------------------------------------------
'''Fix 1''' since wp_remote_fopen does not properly handle local files
versus remote urls (and by the name of the function probably should not do
so anyhow ("remote" and all that) Uploading a file instead of linking to
a file already on the web for import caused $opml to be set as boolean
false. This in turn was not very parse-able by the xml routines. So I
wrapped the setting of $opml in an if statement that would use
file_get_contents() for local files and wp_remote_fopen() for remote
files.
----
'''Fix 2''' unlinking an uploaded file for import should pass the file
through the wp_delete_file filter.
--
Ticket URL: <http://trac.wordpress.org/ticket/4243>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list