[wp-trac] [WordPress Trac] #30121: wpmu_delete_blog function clears the whole uploads directory
WordPress Trac
noreply at wordpress.org
Tue Oct 28 19:57:57 UTC 2014
#30121: wpmu_delete_blog function clears the whole uploads directory
--------------------------------+-------------------------
Reporter: katazina | Owner: jeremyfelt
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 4.1
Component: Networks and Sites | Version: 3.5
Severity: critical | Resolution:
Keywords: needs-patch | Focuses: multisite
--------------------------------+-------------------------
Comment (by jeremyfelt):
@katazina - I forgot to mention - this is an excellent bug report, thank
you!
@nofearinc - There may be something in a check for the uploads dir. I'd
like to do some more testing with what happens on a site that has defined
a custom uploads URL and path.
Current thoughts:
* This can happen with or without ms-files enabled. This means we can't
use that as a check.
* I'm not sure that we can rely on a hard coded path check like we did
when we knew that `blogs.dir` existed in the structure. It may be enough
to check for blog ID, but it may not.
* I **think** we can be confident in the `get_blog_details()` response
providing `$blog` and using `get_option( 'siteurl' )` to provide the
`$blog->siteurl` property. If that site URL is not available, I think we
can assume that the wrong path will be found by `wp_upload_path()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30121#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list