#21960 closed defect (bug) (fixed)
Exporter doesn't exclude auto-drafts when calculating the authors list
Reported by: | westi | Owned by: | westi |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Export | Keywords: | has-patch |
Focuses: | Cc: |
Description
The exported correctly excludes auto-drafts from the file but not when calculating the list of authors on the blog.
This means the export file can have a list of authors which doesn't match those on the blog and can include users that might not be expected when the WordPress install has multisite enabled as auto-drafts can get created for Super Admins on other users blogs.
Attachments (2)
Change History (6)
#1
follow-up:
↓ 2
@
12 years ago
I wrote some tests for this (attached) but we can really use them at the moment because these functions are defined inside export_wp and that throws headers already sent errors and phpunit marks the test as having errors.
Ideally we should make these functions more globally available - the export includes are only included when we load export.php anyway.
#2
in reply to:
↑ 1
@
12 years ago
Replying to westi:
I wrote some tests for this (attached) but we can really use them at the moment because these functions are defined inside export_wp and that throws headers already sent errors and phpunit marks the test as having errors.
Ideally we should make these functions more globally available - the export includes are only included when we load export.php anyway.
Yep, they should just be pulled into export.php. Defining functions inside functions is a pretty silly endeavor.
Simple patch to fix this issue