Conversation
rmccue
requested changes
Oct 7, 2016
class-command.php
Outdated
| * | ||
| * [--disable-fetch-attachments] | ||
| * : Disable downloading external attachments. | ||
| * |
Member
There was a problem hiding this comment.
This needs to be in a separate PR.
class-wxr-import-ui.php
Outdated
| $err = $this->handle_select( wp_unslash( $_REQUEST['id'] ) ); | ||
|
|
||
| $previous_import = get_post_meta( $this->id, '_importer_state', true ); | ||
| if ( is_a( $previous_import, 'WXR_Importer' ) ) { |
Member
There was a problem hiding this comment.
This needs to use instanceof; is_a is deprecated in 5.2.
class-wxr-import-ui.php
Outdated
| 'node' => $importer->current_node, | ||
| ) ); | ||
| exit; | ||
| }); |
Member
There was a problem hiding this comment.
This needs to be 5.2 compatible, I think?
| if ( ! empty( $mapping['slug_overrides'] ) ) { | ||
| $importer->set_user_slug_overrides( $mapping['slug_overrides'] ); | ||
| // Try to restore the importer from a previous run. | ||
| $importer = get_post_meta( $this->id, '_importer_state', true ); |
Member
Author
There was a problem hiding this comment.
It essentially is optional, see the "Resume" intermediary screen, however I need to add the delete resume data from that.
| if ( $element_count < $this->current_node ) { | ||
| continue; | ||
| } | ||
| $this->current_node = $element_count; |
Member
There was a problem hiding this comment.
This should be after the ::ELEMENT check, otherwise you could resume half-way through an attribute.
rmccue
approved these changes
Mar 8, 2017
Member
rmccue
left a comment
There was a problem hiding this comment.
Totally forgot to merge this. Changes look good.
Will test it out locally before I merge though.
30 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the importer runs a full everytime, which can be a big issue when there is a low execution time limit on the server. Instead, it would be great if the importer resued where it left off so it will function in all environments.