Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid - Version branch.issue-454.202103301008

Version Description

Download this release

Release Info

Developer boldgrid
Plugin Icon 128x128 Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid
Version branch.issue-454.202103301008
Comparing to
See all releases

Code changes from version branch.issue-454.202103251048 to branch.issue-454.202103301008

cli/{verify-20790cb73f621b9334b9917d8a8e551c.php → verify-c04f1894876dd901b94fbc9af97a41f2.php} RENAMED
File without changes
coverage.xml CHANGED
@@ -1,6 +1,6 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1616684211">
3
- <project timestamp="1616684211">
4
  <package name="Boldgrid\Backup\Admin\Card">
5
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
6
  <class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
@@ -15511,9 +15511,9 @@
15511
  </file>
15512
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
15513
  <class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
15514
- <metrics complexity="8" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="54" coveredstatements="0" elements="55" coveredelements="0"/>
15515
  </class>
15516
- <line num="32" type="method" name="send_file" visibility="public" complexity="8" crap="72" count="0"/>
15517
  <line num="33" type="stmt" count="0"/>
15518
  <line num="34" type="stmt" count="0"/>
15519
  <line num="35" type="stmt" count="0"/>
@@ -15534,7 +15534,6 @@
15534
  <line num="57" type="stmt" count="0"/>
15535
  <line num="58" type="stmt" count="0"/>
15536
  <line num="59" type="stmt" count="0"/>
15537
- <line num="60" type="stmt" count="0"/>
15538
  <line num="61" type="stmt" count="0"/>
15539
  <line num="62" type="stmt" count="0"/>
15540
  <line num="68" type="stmt" count="0"/>
@@ -15551,24 +15550,21 @@
15551
  <line num="96" type="stmt" count="0"/>
15552
  <line num="97" type="stmt" count="0"/>
15553
  <line num="98" type="stmt" count="0"/>
15554
- <line num="99" type="stmt" count="0"/>
15555
  <line num="100" type="stmt" count="0"/>
 
15556
  <line num="102" type="stmt" count="0"/>
15557
- <line num="103" type="stmt" count="0"/>
15558
  <line num="104" type="stmt" count="0"/>
15559
  <line num="105" type="stmt" count="0"/>
15560
  <line num="106" type="stmt" count="0"/>
15561
- <line num="107" type="stmt" count="0"/>
15562
  <line num="108" type="stmt" count="0"/>
 
15563
  <line num="110" type="stmt" count="0"/>
15564
  <line num="111" type="stmt" count="0"/>
15565
  <line num="112" type="stmt" count="0"/>
15566
- <line num="113" type="stmt" count="0"/>
15567
- <line num="114" type="stmt" count="0"/>
15568
  <line num="117" type="stmt" count="0"/>
15569
- <line num="118" type="stmt" count="0"/>
15570
- <line num="119" type="stmt" count="0"/>
15571
- <metrics loc="120" ncloc="60" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="54" coveredstatements="0" elements="55" coveredelements="0"/>
15572
  </file>
15573
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-i18n.php">
15574
  <class name="Boldgrid_Backup_I18n" namespace="global" fullPackage="Boldgrid.Backup">
@@ -77118,7 +77114,7 @@
77118
  <metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
77119
  </file>
77120
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
77121
- <class name="ComposerStaticInit681fe027f69d020ee147a0b297a454ab" namespace="Composer\Autoload">
77122
  <metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
77123
  </class>
77124
  <line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
@@ -77210,7 +77206,7 @@
77210
  <metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
77211
  </file>
77212
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
77213
- <class name="ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab" namespace="global">
77214
  <metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
77215
  </class>
77216
  <line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
@@ -96455,6 +96451,6 @@
96455
  <line num="16" type="stmt" count="0"/>
96456
  <metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
96457
  </file>
96458
- <metrics files="964" loc="193818" ncloc="118110" classes="872" methods="3606" coveredmethods="311" conditionals="0" coveredconditionals="0" statements="86926" coveredstatements="4602" elements="90532" coveredelements="4913"/>
96459
  </project>
96460
  </coverage>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <coverage generated="1617113968">
3
+ <project timestamp="1617113968">
4
  <package name="Boldgrid\Backup\Admin\Card">
5
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
6
  <class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
15511
  </file>
15512
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
15513
  <class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
15514
+ <metrics complexity="9" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="50" coveredstatements="0" elements="51" coveredelements="0"/>
15515
  </class>
15516
+ <line num="32" type="method" name="send_file" visibility="public" complexity="9" crap="90" count="0"/>
15517
  <line num="33" type="stmt" count="0"/>
15518
  <line num="34" type="stmt" count="0"/>
15519
  <line num="35" type="stmt" count="0"/>
15534
  <line num="57" type="stmt" count="0"/>
15535
  <line num="58" type="stmt" count="0"/>
15536
  <line num="59" type="stmt" count="0"/>
 
15537
  <line num="61" type="stmt" count="0"/>
15538
  <line num="62" type="stmt" count="0"/>
15539
  <line num="68" type="stmt" count="0"/>
15550
  <line num="96" type="stmt" count="0"/>
15551
  <line num="97" type="stmt" count="0"/>
15552
  <line num="98" type="stmt" count="0"/>
 
15553
  <line num="100" type="stmt" count="0"/>
15554
+ <line num="101" type="stmt" count="0"/>
15555
  <line num="102" type="stmt" count="0"/>
 
15556
  <line num="104" type="stmt" count="0"/>
15557
  <line num="105" type="stmt" count="0"/>
15558
  <line num="106" type="stmt" count="0"/>
 
15559
  <line num="108" type="stmt" count="0"/>
15560
+ <line num="109" type="stmt" count="0"/>
15561
  <line num="110" type="stmt" count="0"/>
15562
  <line num="111" type="stmt" count="0"/>
15563
  <line num="112" type="stmt" count="0"/>
15564
+ <line num="115" type="stmt" count="0"/>
15565
+ <line num="116" type="stmt" count="0"/>
15566
  <line num="117" type="stmt" count="0"/>
15567
+ <metrics loc="118" ncloc="56" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="50" coveredstatements="0" elements="51" coveredelements="0"/>
 
 
15568
  </file>
15569
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-i18n.php">
15570
  <class name="Boldgrid_Backup_I18n" namespace="global" fullPackage="Boldgrid.Backup">
77114
  <metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
77115
  </file>
77116
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
77117
+ <class name="ComposerStaticInitb4e140382c8f7d1b833aa24902b50159" namespace="Composer\Autoload">
77118
  <metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
77119
  </class>
77120
  <line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
77206
  <metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
77207
  </file>
77208
  <file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
77209
+ <class name="ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159" namespace="global">
77210
  <metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
77211
  </class>
77212
  <line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
96451
  <line num="16" type="stmt" count="0"/>
96452
  <metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
96453
  </file>
96454
+ <metrics files="964" loc="193816" ncloc="118106" classes="872" methods="3606" coveredmethods="311" conditionals="0" coveredconditionals="0" statements="86922" coveredstatements="4602" elements="90528" coveredelements="4913"/>
96455
  </project>
96456
  </coverage>
includes/class-boldgrid-backup-file.php CHANGED
@@ -53,12 +53,12 @@ class Boldgrid_Backup_File {
53
  header( 'Content-Type: binary/octet-stream' );
54
  header( 'Content-Length: ' . $filesize );
55
 
56
- // Check and flush output buffer if needed.
57
- $ob_level = ob_get_level();
58
- $log->add( 'Output buffering level: ' . $ob_level );
59
- if ( 0 !== $ob_level ) {
60
- $log->add( 'Calling ob_end_flush().' );
61
- ob_end_flush();
62
  }
63
 
64
  /*
@@ -93,17 +93,15 @@ class Boldgrid_Backup_File {
93
  $buffer_size = 1024 * 1024;
94
  $log->add( 'Beginnig to send file... Buffer size: ' . size_format( $buffer_size, 2 ) );
95
  while ( ! feof( $handle ) ) {
96
- $log->add( 'Reading buffer...' );
97
- $time_start = microtime( true );
98
- $buffer = fread( $handle, $buffer_size ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fread
99
- $duration = microtime( true ) - $time_start;
100
- $log->add( 'Buffer read in ' . round( $duration, 4 ) . ' seconds.' );
101
-
102
- $log->add( 'Sending buffer...' );
103
- $time_start = microtime( true );
104
  echo $buffer; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
105
- $duration = microtime( true ) - $time_start;
106
- $log->add( 'Buffer sent in ' . round( $duration, 4 ) . ' seconds.' );
 
107
  }
108
  $log->add( 'Finished sending file.' );
109
 
53
  header( 'Content-Type: binary/octet-stream' );
54
  header( 'Content-Length: ' . $filesize );
55
 
56
+ // Clean up output buffering.
57
+ while ( $ob_level = ob_get_level() ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition
58
+ $buffer_contents = ob_get_contents();
59
+ $log->add( 'ob level ' . $ob_level . ' contents preview: ' . substr( $buffer_contents, 0, 100 ) );
60
+
61
+ $log->add( 'Calling ob_end_clean()... ' . ( ob_end_clean() ? 'Success' : 'Fail' ) );
62
  }
63
 
64
  /*
93
  $buffer_size = 1024 * 1024;
94
  $log->add( 'Beginnig to send file... Buffer size: ' . size_format( $buffer_size, 2 ) );
95
  while ( ! feof( $handle ) ) {
96
+ $time_start_read = microtime( true );
97
+ $buffer = fread( $handle, $buffer_size ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fread
98
+ $duration_read = microtime( true ) - $time_start_read;
99
+
100
+ $time_start_send = microtime( true );
 
 
 
101
  echo $buffer; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
102
+ $duration_send = microtime( true ) - $time_start_send;
103
+
104
+ $log->add( 'Buffer read in ' . round( $duration_read, 4 ) . ' seconds and sent in ' . round( $duration_send, 4 ) . ' seconds.' );
105
  }
106
  $log->add( 'Finished sending file.' );
107
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit681fe027f69d020ee147a0b297a454ab::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit681fe027f69d020ee147a0b297a454ab
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit681fe027f69d020ee147a0b297a454ab::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire681fe027f69d020ee147a0b297a454ab($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire681fe027f69d020ee147a0b297a454ab($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitb4e140382c8f7d1b833aa24902b50159::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInitb4e140382c8f7d1b833aa24902b50159::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequireb4e140382c8f7d1b833aa24902b50159($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequireb4e140382c8f7d1b833aa24902b50159($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit681fe027f69d020ee147a0b297a454ab
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
@@ -91,9 +91,9 @@ class ComposerStaticInit681fe027f69d020ee147a0b297a454ab
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
- $loader->prefixLengthsPsr4 = ComposerStaticInit681fe027f69d020ee147a0b297a454ab::$prefixLengthsPsr4;
95
- $loader->prefixDirsPsr4 = ComposerStaticInit681fe027f69d020ee147a0b297a454ab::$prefixDirsPsr4;
96
- $loader->classMap = ComposerStaticInit681fe027f69d020ee147a0b297a454ab::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb4e140382c8f7d1b833aa24902b50159
8
  {
9
  public static $files = array (
10
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
91
  public static function getInitializer(ClassLoader $loader)
92
  {
93
  return \Closure::bind(function () use ($loader) {
94
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb4e140382c8f7d1b833aa24902b50159::$prefixLengthsPsr4;
95
+ $loader->prefixDirsPsr4 = ComposerStaticInitb4e140382c8f7d1b833aa24902b50159::$prefixDirsPsr4;
96
+ $loader->classMap = ComposerStaticInitb4e140382c8f7d1b833aa24902b50159::$classMap;
97
 
98
  }, null, ClassLoader::class);
99
  }