Skip to content

Commit

Permalink
last changes before release
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Jan 29, 2016
1 parent 9dfa628 commit 1ca7a47
Show file tree
Hide file tree
Showing 12 changed files with 207 additions and 206 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## v3.0.1 (2016-01-27)
## v3.0.0 (2016-01-27)
- Refactor the plugin, new requirements, goal and result.
- -Thanks to [Sven Hinse](https://github.com/s-hinse/) for help to maintain the plugin-
- Changeable table prefix on replace Site URL tab enhancement
- Implement database backup & import tab
Expand All @@ -9,7 +10,7 @@
- Multisite basic support - Show only tables of current site
- Add spectial tab for replace the url
- Supports serialized data
- Refaktor the whole codebase
- Refactor the whole codebase

## v2.7.1 (2015-05-28)
- Fix for changes on database collate since WordPress version 4.2
Expand Down
2 changes: 1 addition & 1 deletion inspyde-search-replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Inpsyde GmbH
* Author URI: http://inpsyde.com
* Contributors: s-hinse, derpixler
* Version: 3.0.1
* Version: 3.0.0
* Text Domain: insr
* Domain Path: /languages
* License: GPLv3+
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/inpsyde-search-replace.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@ input[name="search"], input[name="replace"], #select_tables {
}

#insr_submit{
margin-bottom: 10px;
margin-bottom: 10px;
}
8 changes: 4 additions & 4 deletions src/inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected function show_changes( $report ) {
*/
public function deliver_backup_file() {

if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] === "download_file" ) {
if ( isset( $_POST[ 'action' ] ) && 'download_file' === $_POST[ 'action' ] ) {

$sql_file = '';
if ( isset( $_POST[ 'sql_file' ] ) ) {
Expand Down Expand Up @@ -228,7 +228,7 @@ protected function show_download_button( $file, $compress ) {
$html = '<input type="hidden" name="action" value="download_file" />';
$html .= '<input type ="hidden" name="sql_file" value="' . esc_attr( $file ) . '">';
$html .= '<input type ="hidden" name="compress" value="' . esc_attr( $compress ) . '">';
$html .= '<input id ="insr_submit"type="submit" value="' . esc_attr( $value ) . ' "class="button" />';
$html .= '<input id ="insr_submit" type="submit" value="' . esc_attr( $value ) . '" class="button" />';
$html .= '</form></div>';
echo $html;
}
Expand Down Expand Up @@ -287,7 +287,7 @@ protected function trim_search_results( $needle, $haystack, $delimiter ) {

$trimmed_results = NULL;
// Get all occurrences of $needle with up to 50 chars front & back.
preg_match_all( "@.{0,50}" . $needle . ".{0,50}@", $haystack, $trimmed_results );
preg_match_all( '@.{0,50}' . $needle . '.{0,50}@', $haystack, $trimmed_results );
$return_value = '';
/** @var array $trimmed_results */
$imax = count( $trimmed_results );
Expand All @@ -308,7 +308,7 @@ protected function trim_search_results( $needle, $haystack, $delimiter ) {
$trimmed_result_length = strlen( $trimmed_results[ 0 ][ $i ] );
$substring = substr( $haystack, - $trimmed_result_length );
if ( $substring === $trimmed_results[ 0 ][ $i ] ) {
$local_delimiter[ 1 ] = "";
$local_delimiter[ 1 ] = '';
}

}
Expand Down
10 changes: 6 additions & 4 deletions src/inc/DatabaseExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class DatabaseExporter {
protected $backup_filename;

/**
* @var Store file path.
* Store file path.
*
* @var $fp
*/
protected $fp;

Expand Down Expand Up @@ -189,7 +191,7 @@ public function backup_table( $search = '', $replace = '', $table, $new_table_pr
//do we need to replace the prefix?
$table_prefix = $this->dbm->get_base_prefix();
$new_table = $table;
if ( "" !== $new_table_prefix ) {
if ( '' !== $new_table_prefix ) {
$new_table = $this->get_new_table_name( $table, $new_table_prefix );

}
Expand Down Expand Up @@ -471,10 +473,10 @@ public function deliver_backup( $filename = '', $compress = FALSE ) {
if ( function_exists( 'file_get_contents' ) ) {
$text = file_get_contents( $diskfile );
} else {
$text = implode( "", file( $diskfile ) );
$text = implode( '', file( $diskfile ) );
}
$gz_text = gzencode( $text, 9 );
$fp = fopen( $gz_diskfile, "w" );
$fp = fopen( $gz_diskfile, 'w' );
fwrite( $fp, $gz_text );
if ( fclose( $fp ) ) {
unlink( $diskfile );
Expand Down
3 changes: 2 additions & 1 deletion src/inc/SearchReplaceAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function show_page() {

//check if "search replace"-button was clicked

if ( isset ( $_POST[ 'action' ] ) && $_POST[ 'action' ] === "search_replace"
if ( isset ( $_POST[ 'action' ] ) && 'search_replace' === $_POST[ 'action' ]
&& check_admin_referer( 'do_search_replace', 'insr_nonce' )
) {
$this->handle_search_replace_event();
Expand All @@ -35,6 +35,7 @@ protected function show_table_list() {
$select_rows = $table_count < 20 ? $table_count : 20;

//if we come from a dry run, we select the tables to the dry run again
/** @var bool | string $selected_tables */
$selected_tables = FALSE;
if ( isset( $_POST[ 'select_tables' ] ) ) {
$selected_tables = $_POST[ 'select_tables' ];
Expand Down
2 changes: 1 addition & 1 deletion src/inc/templates/credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<h2><?php esc_html_e( 'Hey nice to have you here!', 'insr' ); ?></h2>
<p><?php printf(
__( 'Search and Replace is refactored by <a href="%1$s">Inpsyde GmbH</a> and based on the original from <a href="%2$s">Mark Cunningham</a> ', 'insr' ),
__( 'Search and Replace is refactored in 2015 by <a href="%1$s">Inpsyde GmbH</a>, maintained since 2006 and based on the original from <a href="%2$s">Mark Cunningham</a>.', 'insr' ),
'http://inpsyde.com/',
'http://thedeadone.net'
); ?></p>
Expand Down
2 changes: 1 addition & 1 deletion src/inspyde-search-replace.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Inpsyde GmbH
* Author URI: http://inpsyde.com
* Contributors: s-hinse, derpixler
* Version: 3.0.1
* Version: 3.0.0
* Text Domain: insr
* Domain Path: /languages
* License: GPLv3+
Expand Down
Binary file modified src/languages/insr-de_DE.mo
100755 → 100644
Binary file not shown.
Loading

0 comments on commit 1ca7a47

Please sign in to comment.