WP Staging – DB & File Duplicator & Migration - Version 2.6.6

Version Description

  • Fix: Fatal error: Cannot redeclare wpstgpro_overwrite_nonce() and wpstg_overwrite_nonce() after activating pro version on top of this free one
  • Fix: wpdb->prepare() warning after initial cloning
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 WP Staging – DB & File Duplicator & Migration
Version 2.6.6
Comparing to
See all releases

Code changes from version 2.6.5 to 2.6.6

Backend/Modules/Jobs/Data.php CHANGED
@@ -456,7 +456,7 @@ define( 'DB_COLLATE', '" . DB_COLLATE . "' );\r\n";
456
 
457
  $result = $this->db->query(
458
  $this->db->prepare(
459
- "UPDATE {$this->prefix}options SET option_value = %s WHERE option_name = 'rewrite_rules'", array()
460
  )
461
  );
462
 
456
 
457
  $result = $this->db->query(
458
  $this->db->prepare(
459
+ "UPDATE {$this->prefix}options SET option_value = %s WHERE option_name = 'rewrite_rules'", null
460
  )
461
  );
462
 
Backend/Modules/Jobs/Database.php CHANGED
@@ -59,7 +59,7 @@ class Database extends JobExecutable {
59
  private function isFatalError() {
60
  $path = trailingslashit($this->options->cloneDir);
61
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
62
- $this->returnException( " Can not continue! Change the name of the clone or delete existing folder. Then try again. Folder already exists and is not empty: " . $path );
63
  }
64
  return false;
65
  }
59
  private function isFatalError() {
60
  $path = trailingslashit($this->options->cloneDir);
61
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
62
+ $this->returnException(" Can not continue for security purposes. Directory {$path} is not empty! Use FTP or a file manager plugin and make sure it does not contain any files. ");
63
  }
64
  return false;
65
  }
Backend/Modules/Jobs/DatabaseExternal.php CHANGED
@@ -91,10 +91,9 @@ class DatabaseExternal extends JobExecutable {
91
  * @return boolean
92
  */
93
  private function isFatalError() {
94
- //$path = trailingslashit( get_home_path() ) . $this->options->cloneDirectoryName;
95
  $path = trailingslashit($this->options->cloneDir);
96
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
97
- $this->returnException( " Can not continue! Change the name of the clone or delete existing folder. Then try again. Folder already exists and is not empty: " . $path );
98
  }
99
  return false;
100
  }
91
  * @return boolean
92
  */
93
  private function isFatalError() {
 
94
  $path = trailingslashit($this->options->cloneDir);
95
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
96
+ $this->returnException(" Can not continue for security purposes. Directory {$path} is not empty! Use FTP or a file manager plugin and make sure it does not contain any files. ");
97
  }
98
  return false;
99
  }
Backend/Modules/Jobs/Multisite/Data.php CHANGED
@@ -462,7 +462,7 @@ define( 'DB_COLLATE', '" . DB_COLLATE . "' );\r\n";
462
 
463
  $result = $this->db->query(
464
  $this->db->prepare(
465
- "UPDATE {$this->prefix}options SET option_value = %s WHERE option_name = 'rewrite_rules'", ' '
466
  )
467
  );
468
 
462
 
463
  $result = $this->db->query(
464
  $this->db->prepare(
465
+ "UPDATE {$this->prefix}options SET option_value = %s WHERE option_name = 'rewrite_rules'", null
466
  )
467
  );
468
 
Backend/Modules/Jobs/Multisite/Database.php CHANGED
@@ -58,10 +58,9 @@ class Database extends JobExecutable {
58
  * @return boolean
59
  */
60
  private function isFatalError() {
61
- //$path = trailingslashit( get_home_path() ) . $this->options->cloneDirectoryName;
62
  $path = trailingslashit($this->options->cloneDir);
63
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && is_dir( $path ) && !wpstg_is_empty_dir( $path) ) {
64
- $this->returnException( " Can not continue! Change the name of the clone or delete existing folder. Then try again. Folder already exists and is not empty: " . $path );
65
  }
66
  return false;
67
  }
58
  * @return boolean
59
  */
60
  private function isFatalError() {
 
61
  $path = trailingslashit($this->options->cloneDir);
62
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && is_dir( $path ) && !wpstg_is_empty_dir( $path) ) {
63
+ $this->returnException(" Can not continue for security purposes. Directory {$path} is not empty! Use FTP or a file manager plugin and make sure it does not contain any files. ");
64
  }
65
  return false;
66
  }
Backend/Modules/Jobs/Multisite/DatabaseExternal.php CHANGED
@@ -100,10 +100,9 @@ class DatabaseExternal extends JobExecutable {
100
  * @return boolean
101
  */
102
  private function isFatalError() {
103
- //$path = trailingslashit( get_home_path() ) . $this->options->cloneDirectoryName;
104
  $path = trailingslashit( $this->options->cloneDir );
105
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
106
- $this->returnException( " Can not continue! Change the name of the clone or delete existing folder. Then try again. Folder already exists and is not empty: " . $path );
107
  }
108
  return false;
109
  }
100
  * @return boolean
101
  */
102
  private function isFatalError() {
 
103
  $path = trailingslashit( $this->options->cloneDir );
104
  if( isset( $this->options->mainJob ) && $this->options->mainJob !== 'updating' && (is_dir( $path ) && !wpstg_is_empty_dir( $path ) ) ) {
105
+ $this->returnException(" Can not continue for security purposes. Directory {$path} is not empty! Use FTP or a file manager plugin and make sure it does not contain any files. ");
106
  }
107
  return false;
108
  }
readme.txt CHANGED
@@ -1,4 +1,4 @@
1
- === WP Staging - DB & File Duplicator & Migration ===
2
 
3
  Author URL: https://wordpress.org/plugins/wp-staging
4
  Plugin URL: https://wordpress.org/plugins/wp-staging
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
10
  Requires at least: 3.6+
11
  Tested up to: 5.3
12
- Stable tag: 2.6.5
13
  Requires PHP: 5.3
14
 
15
  A duplicator plugin - clone/move, duplicate & migrate live websites to independent staging and development sites that are accessible​ by authorized users only.
@@ -153,6 +153,10 @@ https://wp-staging.com
153
 
154
  == Changelog ==
155
 
 
 
 
 
156
  = 2.6.5 =
157
  * New: Support for WordPress 5.3.1
158
  * New: Refactoring code base and remove app folder
@@ -234,3 +238,4 @@ Complete changelog: [https://wp-staging.com/wp-staging-changelog](https://wp-sta
234
  * Fix: Function fnmatch() not available in all systems
235
  * Fix: Warning in staging site after initial cloning in db row rewrite_rules
236
  * Fix: Wrong staging site is selected when delete function is executed and there are more then 10 staging sites
 
1
+ === WP Staging - Clone Duplicator & Migration ===
2
 
3
  Author URL: https://wordpress.org/plugins/wp-staging
4
  Plugin URL: https://wordpress.org/plugins/wp-staging
9
  Tags: staging, duplication, cloning, clone, migration, sandbox, test site, testing, backup, post, admin, administration, duplicate posts
10
  Requires at least: 3.6+
11
  Tested up to: 5.3
12
+ Stable tag: 2.6.6
13
  Requires PHP: 5.3
14
 
15
  A duplicator plugin - clone/move, duplicate & migrate live websites to independent staging and development sites that are accessible​ by authorized users only.
153
 
154
  == Changelog ==
155
 
156
+ = 2.6.6 =
157
+ * Fix: Fatal error: Cannot redeclare wpstgpro_overwrite_nonce() and wpstg_overwrite_nonce() after activating pro version on top of this free one
158
+ * Fix: wpdb->prepare() warning after initial cloning
159
+
160
  = 2.6.5 =
161
  * New: Support for WordPress 5.3.1
162
  * New: Refactoring code base and remove app folder
238
  * Fix: Function fnmatch() not available in all systems
239
  * Fix: Warning in staging site after initial cloning in db row rewrite_rules
240
  * Fix: Wrong staging site is selected when delete function is executed and there are more then 10 staging sites
241
+ * Fix: Fatal error: Cannot redeclare wpstgpro_overwrite_nonce() and wpstg_overwrite_nonce() after activating pro version on top of this free one
wp-staging.php CHANGED
@@ -7,7 +7,7 @@
7
  * Author: WP-Staging
8
  * Author URI: https://wp-staging.com
9
  * Contributors: ReneHermi, ilgityildirim
10
- * Version: 2.6.5
11
  * Text Domain: wp-staging
12
  * Domain Path: /languages/
13
  *
@@ -39,7 +39,7 @@ if (!defined('WPSTG_PLUGIN_SLUG')) {
39
 
40
  // Plugin Version
41
  if (!defined('WPSTG_VERSION')) {
42
- define('WPSTG_VERSION', '2.6.5');
43
  }
44
 
45
  // Compatible up to WordPress Version
@@ -69,12 +69,13 @@ if( !defined( 'WPSTG_PLUGIN_URL' ) ) {
69
  * @param int $seconds
70
  * @return int
71
  */
72
- function wpstgpro_overwrite_nonce($seconds)
73
- {
74
- return 86400;
 
75
  }
76
 
77
- add_filter('nonce_life', 'wpstgpro_overwrite_nonce', 99999);
78
 
79
  /**
80
  * Do not show update notifications for WP Staging Pro on the staging site
@@ -82,14 +83,16 @@ add_filter('nonce_life', 'wpstgpro_overwrite_nonce', 99999);
82
  * @param type object
83
  * @return object
84
  */
85
- function wpstg_filter_plugin_updates($value)
86
- {
87
- if (wpstg_is_stagingsite()) {
88
- if (isset($value->response['wp-staging-pro/wp-staging-pro.php'])) {
89
- unset($value->response['wp-staging-pro/wp-staging-pro.php']);
 
 
90
  }
 
91
  }
92
- return $value;
93
  }
94
 
95
  add_filter('site_transient_update_plugins', 'wpstg_filter_plugin_updates');
7
  * Author: WP-Staging
8
  * Author URI: https://wp-staging.com
9
  * Contributors: ReneHermi, ilgityildirim
10
+ * Version: 2.6.6
11
  * Text Domain: wp-staging
12
  * Domain Path: /languages/
13
  *
39
 
40
  // Plugin Version
41
  if (!defined('WPSTG_VERSION')) {
42
+ define('WPSTG_VERSION', '2.6.6');
43
  }
44
 
45
  // Compatible up to WordPress Version
69
  * @param int $seconds
70
  * @return int
71
  */
72
+ if ( !function_exists( 'wpstg_overwrite_nonce')){
73
+ function wpstg_overwrite_nonce( $seconds ) {
74
+ return 86400;
75
+ }
76
  }
77
 
78
+ add_filter( 'nonce_life', 'wpstg_overwrite_nonce', 99999 );
79
 
80
  /**
81
  * Do not show update notifications for WP Staging Pro on the staging site
83
  * @param type object
84
  * @return object
85
  */
86
+ if ( !function_exists( 'wpstg_filter_plugin_updates')) {
87
+ function wpstg_filter_plugin_updates($value)
88
+ {
89
+ if (wpstg_is_stagingsite()) {
90
+ if (isset($value->response['wp-staging-pro/wp-staging-pro.php'])) {
91
+ unset($value->response['wp-staging-pro/wp-staging-pro.php']);
92
+ }
93
  }
94
+ return $value;
95
  }
 
96
  }
97
 
98
  add_filter('site_transient_update_plugins', 'wpstg_filter_plugin_updates');