Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSV Format search/replace to Search & Replace Tab #82

Merged
merged 5 commits into from Jun 15, 2017

Conversation

2 participants
@gerbilOFdoom
Copy link

commented Apr 19, 2017

I've found myself in need of a bulk search/replace function for some time now to handle broken links that occur when importing a site from HTML to Wordpress. To that end, I've added a CSV option to the Search & Replace tab.

The CSV option's label is missing translations for German and Chinese.

Bryson Zimmerman added some commits Apr 19, 2017

Bryson Zimmerman
Added CSV search/replace for save to database option
Created CSV entry in Search & Replace tab
Pass csv data to replace_values function
Note: Change counter will only increment on cells changed and not number
of changes made in a cell
Missing: Multilingual support
Bryson Zimmerman
Updated CSV language
CSV label now uses esc_html_e function. Updated default to no longer
include "(optional)" for improved readability.

Still lacking translation to other langauges.
@gerbilOFdoom

This comment has been minimized.

Copy link
Author

commented Jun 14, 2017

@devbanana Do you have thoughts on this pull request? I'd like to fix issues if they exist.

@bueltge
Copy link
Member

left a comment

@devbanana THe codex of the source is wrong. I added two hints an two examples, maybe you will fix this and add this to the pull request? Thanks a lot for your effort.

@@ -327,13 +337,17 @@ public function backup_table( $search = '', $replace = '', $table, $new_table_pr
//skip replace if no search pattern
//check if we need to replace something
//skip primary_key
if ( $search !== '' && $column !== $primary_key ) {
if ( $search !== '' && $column !== $primary_key && $column !== "guid") {

This comment has been minimized.

Copy link
@bueltge

bueltge Jun 15, 2017

Member

Always we use single quote mark, is much faster.

$edited_data = $this->replace->recursive_unserialize_replace(
$search, $replace,
$value
);
if($csv != null) {

This comment has been minimized.

Copy link
@bueltge

bueltge Jun 15, 2017

Member

We need whitespace, like in this example if ( $csv !== null ) { and also a identical usage, strict !== instead of ==.

@bueltge bueltge added this to the 3.2.0 milestone Jun 15, 2017

@bueltge bueltge added the enhancement label Jun 15, 2017

@bueltge bueltge modified the milestones: 3.1.3, 3.2.0 Jun 15, 2017

@bueltge bueltge changed the base branch from master to csv-format Jun 15, 2017

@bueltge bueltge merged commit afc7553 into inpsyde:csv-format Jun 15, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@bueltge

This comment has been minimized.

Copy link
Member

commented Jun 15, 2017

I merge this pull request in a new branch to fix the formatting issues.

bueltge added a commit that referenced this pull request Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.