Version Description
Release date: Apr 2nd, 2019
- New feature: Users can now specify a custom folder name for FTP uploads.
- Update: Increased precision of "Archive file size" value within progress bar to better show a backup is still occurring and didn't freeze.
- Bug fix: Honor bgbkup-cli method argument.
Download this release
Release Info
Developer | boldgrid |
Plugin | ![]() |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.9.1
- admin/class-boldgrid-backup-admin-in-progress-data.php +3 -2
- admin/class-boldgrid-backup-admin-in-progress.php +2 -3
- admin/compressor/class-boldgrid-backup-admin-compressor-php-zip.php +1 -1
- admin/js/boldgrid-backup-admin-backup-now.js +5 -2
- admin/partials/remote/ftp.php +11 -1
- admin/remote/class-boldgrid-backup-admin-ftp-hooks.php +1 -1
- admin/remote/class-boldgrid-backup-admin-ftp-page.php +8 -1
- admin/remote/class-boldgrid-backup-admin-ftp.php +90 -18
- admin/remote/class-boldgrid-backup-admin-sftp.php +0 -563
- boldgrid-backup.php +1 -1
- coverage.xml +414 -582
- cron/class-site-restore.php +3 -3
- readme.txt +10 -2
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
admin/class-boldgrid-backup-admin-in-progress-data.php
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
* @package Boldgrid_Backup
|
11 |
* @subpackage Boldgrid_Backup/admin
|
12 |
* @copyright BoldGrid
|
13 |
-
* @version $Id$
|
14 |
* @author BoldGrid <support@boldgrid.com>
|
15 |
*/
|
16 |
|
@@ -20,7 +19,6 @@
|
|
20 |
* @since 1.7.0
|
21 |
*/
|
22 |
class Boldgrid_Backup_Admin_In_Progress_Data {
|
23 |
-
|
24 |
/**
|
25 |
* Option name in which data is stored.
|
26 |
*
|
@@ -51,6 +49,7 @@ class Boldgrid_Backup_Admin_In_Progress_Data {
|
|
51 |
*
|
52 |
* @since 1.7.0
|
53 |
*
|
|
|
54 |
* @return mixed
|
55 |
*/
|
56 |
public static function get_arg( $key ) {
|
@@ -76,6 +75,8 @@ class Boldgrid_Backup_Admin_In_Progress_Data {
|
|
76 |
* Generally displayed under a "Backup Now" button.
|
77 |
*
|
78 |
* @since 1.7.0
|
|
|
|
|
79 |
*/
|
80 |
public static function get_markup( $label = null ) {
|
81 |
$label = ! empty( $label ) ? $label : __( 'Initializing backup...', 'boldgrid-backup' );
|
10 |
* @package Boldgrid_Backup
|
11 |
* @subpackage Boldgrid_Backup/admin
|
12 |
* @copyright BoldGrid
|
|
|
13 |
* @author BoldGrid <support@boldgrid.com>
|
14 |
*/
|
15 |
|
19 |
* @since 1.7.0
|
20 |
*/
|
21 |
class Boldgrid_Backup_Admin_In_Progress_Data {
|
|
|
22 |
/**
|
23 |
* Option name in which data is stored.
|
24 |
*
|
49 |
*
|
50 |
* @since 1.7.0
|
51 |
*
|
52 |
+
* @param string $key Index/key.
|
53 |
* @return mixed
|
54 |
*/
|
55 |
public static function get_arg( $key ) {
|
75 |
* Generally displayed under a "Backup Now" button.
|
76 |
*
|
77 |
* @since 1.7.0
|
78 |
+
*
|
79 |
+
* @param string $label Progress label.
|
80 |
*/
|
81 |
public static function get_markup( $label = null ) {
|
82 |
$label = ! empty( $label ) ? $label : __( 'Initializing backup...', 'boldgrid-backup' );
|
admin/class-boldgrid-backup-admin-in-progress.php
CHANGED
@@ -8,7 +8,6 @@
|
|
8 |
* @package Boldgrid_Backup
|
9 |
* @subpackage Boldgrid_Backup/admin
|
10 |
* @copyright BoldGrid
|
11 |
-
* @version $Id$
|
12 |
* @author BoldGrid <support@boldgrid.com>
|
13 |
*/
|
14 |
|
@@ -21,7 +20,7 @@ class Boldgrid_Backup_Admin_In_Progress {
|
|
21 |
/**
|
22 |
* The core class object.
|
23 |
*
|
24 |
-
* @since
|
25 |
* @access private
|
26 |
* @var Boldgrid_Backup_Admin_Core
|
27 |
*/
|
@@ -219,7 +218,7 @@ class Boldgrid_Backup_Admin_In_Progress {
|
|
219 |
$data = array(
|
220 |
'size' => $dirlist[ $tmp_filename ]['size'],
|
221 |
'lastmodunix' => $dirlist[ $tmp_filename ]['lastmodunix'],
|
222 |
-
'size_format' => size_format( $dirlist[ $tmp_filename ]['size'] ),
|
223 |
);
|
224 |
}
|
225 |
|
8 |
* @package Boldgrid_Backup
|
9 |
* @subpackage Boldgrid_Backup/admin
|
10 |
* @copyright BoldGrid
|
|
|
11 |
* @author BoldGrid <support@boldgrid.com>
|
12 |
*/
|
13 |
|
20 |
/**
|
21 |
* The core class object.
|
22 |
*
|
23 |
+
* @since 1.6.0
|
24 |
* @access private
|
25 |
* @var Boldgrid_Backup_Admin_Core
|
26 |
*/
|
218 |
$data = array(
|
219 |
'size' => $dirlist[ $tmp_filename ]['size'],
|
220 |
'lastmodunix' => $dirlist[ $tmp_filename ]['lastmodunix'],
|
221 |
+
'size_format' => size_format( $dirlist[ $tmp_filename ]['size'], 2 ),
|
222 |
);
|
223 |
}
|
224 |
|
admin/compressor/class-boldgrid-backup-admin-compressor-php-zip.php
CHANGED
@@ -191,7 +191,7 @@ class Boldgrid_Backup_Admin_Compressor_Php_Zip extends Boldgrid_Backup_Admin_Com
|
|
191 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_files_done', $number_files_archived );
|
192 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'last_files', $last_x_files );
|
193 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_size_archived', $total_size_archived );
|
194 |
-
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_size_archived_size_format', size_format( $total_size_archived ) );
|
195 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'step', 2 );
|
196 |
}
|
197 |
}
|
191 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_files_done', $number_files_archived );
|
192 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'last_files', $last_x_files );
|
193 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_size_archived', $total_size_archived );
|
194 |
+
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'total_size_archived_size_format', size_format( $total_size_archived, 2 ) );
|
195 |
Boldgrid_Backup_Admin_In_Progress_Data::set_arg( 'step', 2 );
|
196 |
}
|
197 |
}
|
admin/js/boldgrid-backup-admin-backup-now.js
CHANGED
@@ -132,6 +132,9 @@ BOLDGRID.BACKUP.BackupNow = function( $ ) {
|
|
132 |
/**
|
133 |
* @summary backupNow success callback.
|
134 |
*
|
|
|
|
|
|
|
135 |
* @since 1.5.3
|
136 |
*/
|
137 |
successCallback = function( response ) {
|
@@ -141,7 +144,7 @@ BOLDGRID.BACKUP.BackupNow = function( $ ) {
|
|
141 |
success && data.data !== undefined && data.data.callback !== undefined ?
|
142 |
data.data.callback :
|
143 |
null;
|
144 |
-
|
145 |
$( 'body' ).trigger( 'boldgrid_backup_complete' );
|
146 |
|
147 |
switch ( callback ) {
|
@@ -212,7 +215,7 @@ BOLDGRID.BACKUP.BackupNow = function( $ ) {
|
|
212 |
}
|
213 |
}
|
214 |
} );
|
215 |
-
|
216 |
$( 'body' ).trigger( 'boldgrid_backup_initiated' );
|
217 |
|
218 |
// Prevent default browser action.
|
132 |
/**
|
133 |
* @summary backupNow success callback.
|
134 |
*
|
135 |
+
* This is the success callback function for the boldgrid_backup_now ajax call, which is
|
136 |
+
* handled by $Boldgrid_Backup_Admin_Core->boldgrid_backup_now_callback().
|
137 |
+
*
|
138 |
* @since 1.5.3
|
139 |
*/
|
140 |
successCallback = function( response ) {
|
144 |
success && data.data !== undefined && data.data.callback !== undefined ?
|
145 |
data.data.callback :
|
146 |
null;
|
147 |
+
|
148 |
$( 'body' ).trigger( 'boldgrid_backup_complete' );
|
149 |
|
150 |
switch ( callback ) {
|
215 |
}
|
216 |
}
|
217 |
} );
|
218 |
+
|
219 |
$( 'body' ).trigger( 'boldgrid_backup_initiated' );
|
220 |
|
221 |
// Prevent default browser action.
|
admin/partials/remote/ftp.php
CHANGED
@@ -2,7 +2,10 @@
|
|
2 |
/**
|
3 |
* File: ftp.php
|
4 |
*
|
5 |
-
*
|
|
|
|
|
|
|
6 |
*
|
7 |
* @link https://www.boldgrid.com
|
8 |
* @since 1.6.0
|
@@ -62,6 +65,13 @@ $sftp_selected = 'sftp' === $data['type'] ? $selected : '';
|
|
62 |
<input type="password" name="pass" value="<?php echo esc_attr( $data['pass'] ); ?>" required />
|
63 |
</td>
|
64 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<tr>
|
66 |
<td>
|
67 |
<?php esc_html_e( 'Retention (Number of backup archives to retain)', 'boldgrid-backup' ); ?><br />
|
2 |
/**
|
3 |
* File: ftp.php
|
4 |
*
|
5 |
+
* This file handles the rendering of the remote FTP/SFTP options on the settings page.
|
6 |
+
*
|
7 |
+
* The $data array on this page used to fill in the form fields is generated in
|
8 |
+
* Boldgrid_Backup_Admin_Ftp_Page->settings().
|
9 |
*
|
10 |
* @link https://www.boldgrid.com
|
11 |
* @since 1.6.0
|
65 |
<input type="password" name="pass" value="<?php echo esc_attr( $data['pass'] ); ?>" required />
|
66 |
</td>
|
67 |
</tr>
|
68 |
+
<tr>
|
69 |
+
<td colspan="2">
|
70 |
+
<?php esc_html_e( 'Folder name', 'boldgrid-backup' ); ?><br />
|
71 |
+
<?php esc_html_e( 'A folder in your FTP/SFTP server to store your backups, will be created if it doesn\'t exist. Please only use letters, numbers, dashes, and underscores.', 'boldgrid-backup' ); ?><br />
|
72 |
+
<input type="text" name="folder_name" value="<?php echo esc_attr( $data['folder_name'] ); ?>" min="1" required pattern="[A-Za-z0-9-_]+">
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
<tr>
|
76 |
<td>
|
77 |
<?php esc_html_e( 'Retention (Number of backup archives to retain)', 'boldgrid-backup' ); ?><br />
|
admin/remote/class-boldgrid-backup-admin-ftp-hooks.php
CHANGED
@@ -75,7 +75,7 @@ class Boldgrid_Backup_Admin_Ftp_Hooks {
|
|
75 |
* @since 1.6.0
|
76 |
*/
|
77 |
public function filter_get_all() {
|
78 |
-
$contents = $this->core->ftp->get_contents( true, $this->core->ftp->
|
79 |
$contents = $this->core->ftp->format_raw_contents( $contents );
|
80 |
|
81 |
foreach ( $contents as $item ) {
|
75 |
* @since 1.6.0
|
76 |
*/
|
77 |
public function filter_get_all() {
|
78 |
+
$contents = $this->core->ftp->get_contents( true, $this->core->ftp->get_folder_name() );
|
79 |
$contents = $this->core->ftp->format_raw_contents( $contents );
|
80 |
|
81 |
foreach ( $contents as $item ) {
|
admin/remote/class-boldgrid-backup-admin-ftp-page.php
CHANGED
@@ -92,7 +92,11 @@ class Boldgrid_Backup_Admin_Ftp_Page {
|
|
92 |
),
|
93 |
);
|
94 |
|
95 |
-
|
|
|
|
|
|
|
|
|
96 |
$type = $this->core->ftp->default_type;
|
97 |
$blank_data = array(
|
98 |
'type' => $type,
|
@@ -100,6 +104,7 @@ class Boldgrid_Backup_Admin_Ftp_Page {
|
|
100 |
'port' => $this->core->ftp->default_port[ $type ],
|
101 |
'user' => null,
|
102 |
'pass' => null,
|
|
|
103 |
'retention_count' => $this->core->ftp->retention_count,
|
104 |
'nickname' => '',
|
105 |
);
|
@@ -193,6 +198,7 @@ class Boldgrid_Backup_Admin_Ftp_Page {
|
|
193 |
$settings['remote'][ $ftp->key ] = array();
|
194 |
}
|
195 |
|
|
|
196 |
$data = $ftp->get_from_post();
|
197 |
|
198 |
$valid_credentials = $ftp->is_valid_credentials( $data['host'], $data['user'], $data['pass'], $data['port'], $data['type'] );
|
@@ -207,6 +213,7 @@ class Boldgrid_Backup_Admin_Ftp_Page {
|
|
207 |
|
208 |
$settings['remote'][ $ftp->key ]['retention_count'] = $data['retention_count'];
|
209 |
$settings['remote'][ $ftp->key ]['nickname'] = $data['nickname'];
|
|
|
210 |
|
211 |
if ( ! empty( $ftp->errors ) ) {
|
212 |
do_action( 'boldgrid_backup_notice', implode( '<br /><br />', $ftp->errors ) );
|
92 |
),
|
93 |
);
|
94 |
|
95 |
+
/*
|
96 |
+
* Blank data, used when deleting settings.
|
97 |
+
*
|
98 |
+
* If we are deleting our settings, this data will be used to repopulate the form.
|
99 |
+
*/
|
100 |
$type = $this->core->ftp->default_type;
|
101 |
$blank_data = array(
|
102 |
'type' => $type,
|
104 |
'port' => $this->core->ftp->default_port[ $type ],
|
105 |
'user' => null,
|
106 |
'pass' => null,
|
107 |
+
'folder_name' => $this->core->ftp->default_folder_name,
|
108 |
'retention_count' => $this->core->ftp->retention_count,
|
109 |
'nickname' => '',
|
110 |
);
|
198 |
$settings['remote'][ $ftp->key ] = array();
|
199 |
}
|
200 |
|
201 |
+
// This method has default values for each setting and also handles sanitization.
|
202 |
$data = $ftp->get_from_post();
|
203 |
|
204 |
$valid_credentials = $ftp->is_valid_credentials( $data['host'], $data['user'], $data['pass'], $data['port'], $data['type'] );
|
213 |
|
214 |
$settings['remote'][ $ftp->key ]['retention_count'] = $data['retention_count'];
|
215 |
$settings['remote'][ $ftp->key ]['nickname'] = $data['nickname'];
|
216 |
+
$settings['remote'][ $ftp->key ]['folder_name'] = $data['folder_name'];
|
217 |
|
218 |
if ( ! empty( $ftp->errors ) ) {
|
219 |
do_action( 'boldgrid_backup_notice', implode( '<br /><br />', $ftp->errors ) );
|
admin/remote/class-boldgrid-backup-admin-ftp.php
CHANGED
@@ -38,6 +38,16 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
38 |
*/
|
39 |
private $core;
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* Default port numbers.
|
43 |
*
|
@@ -68,6 +78,16 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
68 |
*/
|
69 |
public $errors = array();
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
/**
|
72 |
* Hooks class.
|
73 |
*
|
@@ -124,15 +144,6 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
124 |
*/
|
125 |
private $pass = null;
|
126 |
|
127 |
-
/**
|
128 |
-
* FTP remote directory.
|
129 |
-
*
|
130 |
-
* @since 1.6.0
|
131 |
-
* @access public
|
132 |
-
* @var string
|
133 |
-
*/
|
134 |
-
public $remote_dir = 'boldgrid_backup';
|
135 |
-
|
136 |
/**
|
137 |
* Retention count.
|
138 |
*
|
@@ -222,6 +233,8 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
222 |
$this->hooks = new Boldgrid_Backup_Admin_Ftp_Hooks( $core );
|
223 |
$this->page = new Boldgrid_Backup_Admin_Ftp_Page( $core );
|
224 |
$this->settings = new Boldgrid_Backup_Admin_Remote_Settings( $this->key );
|
|
|
|
|
225 |
}
|
226 |
|
227 |
/**
|
@@ -268,16 +281,16 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
268 |
if ( ! $contents || ! is_array( $contents ) ) {
|
269 |
$this->errors[] = __( 'Unable to get a directory listing from FTP server.', 'boldgrid-backup' );
|
270 |
return false;
|
271 |
-
} elseif ( in_array( $this->
|
272 |
return true;
|
273 |
}
|
274 |
|
275 |
switch ( $this->type ) {
|
276 |
case 'ftp':
|
277 |
-
$created = ftp_mkdir( $this->connection, $this->
|
278 |
break;
|
279 |
case 'sftp':
|
280 |
-
$created = $this->connection->mkdir( $this->
|
281 |
break;
|
282 |
}
|
283 |
|
@@ -288,7 +301,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
288 |
'Unable to create the following directory on FTP server: %1$s',
|
289 |
'boldgrid-backup'
|
290 |
),
|
291 |
-
$this->
|
292 |
);
|
293 |
}
|
294 |
|
@@ -320,7 +333,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
320 |
$this->connect();
|
321 |
|
322 |
$local_filepath = $this->core->backup_dir->get_path_to( $filename );
|
323 |
-
$server_filepath = $this->
|
324 |
$success = false;
|
325 |
|
326 |
$this->log_in();
|
@@ -351,7 +364,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
351 |
return;
|
352 |
}
|
353 |
|
354 |
-
$contents = $this->get_contents( true, $this->
|
355 |
$backups = $this->format_raw_contents( $contents );
|
356 |
|
357 |
$count_to_delete = count( $backups ) - $this->retention_count;
|
@@ -368,7 +381,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
368 |
|
369 |
for ( $x = 0; $x < $count_to_delete; $x++ ) {
|
370 |
$filename = $backups[ $x ]['filename'];
|
371 |
-
$path = $this->
|
372 |
|
373 |
switch ( $this->type ) {
|
374 |
case 'ftp':
|
@@ -392,9 +405,48 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
392 |
}
|
393 |
}
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
/**
|
396 |
* Get our settings from $_POST.
|
397 |
*
|
|
|
|
|
398 |
* @since 1.6.0
|
399 |
*
|
400 |
* @return array
|
@@ -417,6 +469,11 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
417 |
'key' => 'pass',
|
418 |
'default' => null,
|
419 |
),
|
|
|
|
|
|
|
|
|
|
|
420 |
array(
|
421 |
'key' => 'type',
|
422 |
'default' => $this->default_type,
|
@@ -886,6 +943,21 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
886 |
$this->type = $this->default_type;
|
887 |
}
|
888 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
/**
|
890 |
* Set our ftp password.
|
891 |
*
|
@@ -905,7 +977,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
905 |
* @param string $filepath File path.
|
906 |
*/
|
907 |
public function is_uploaded( $filepath ) {
|
908 |
-
$contents = $this->get_contents( false, $this->
|
909 |
|
910 |
return ! is_array( $contents ) ? false : in_array( basename( $filepath ), $contents, true );
|
911 |
}
|
@@ -919,7 +991,7 @@ class Boldgrid_Backup_Admin_Ftp {
|
|
919 |
* @return bool
|
920 |
*/
|
921 |
public function upload( $filepath ) {
|
922 |
-
$remote_file = $this->
|
923 |
|
924 |
$timestamp = filemtime( $filepath );
|
925 |
|
38 |
*/
|
39 |
private $core;
|
40 |
|
41 |
+
/**
|
42 |
+
* Default folder name.
|
43 |
+
*
|
44 |
+
* Set using Boldgrid_Backup_Admin_Ftp->set_default_folder_name(), within the constructor.
|
45 |
+
*
|
46 |
+
* @since 1.9.1
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
public $default_folder_name;
|
50 |
+
|
51 |
/**
|
52 |
* Default port numbers.
|
53 |
*
|
78 |
*/
|
79 |
public $errors = array();
|
80 |
|
81 |
+
/**
|
82 |
+
* The folder on the remote FTP server where backups are stored.
|
83 |
+
*
|
84 |
+
* Handled by Boldgrid_Backup_Admin_Ftp->get_folder_name().
|
85 |
+
*
|
86 |
+
* @since 1.9.1
|
87 |
+
* @var string
|
88 |
+
*/
|
89 |
+
public $folder_name;
|
90 |
+
|
91 |
/**
|
92 |
* Hooks class.
|
93 |
*
|
144 |
*/
|
145 |
private $pass = null;
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
/**
|
148 |
* Retention count.
|
149 |
*
|
233 |
$this->hooks = new Boldgrid_Backup_Admin_Ftp_Hooks( $core );
|
234 |
$this->page = new Boldgrid_Backup_Admin_Ftp_Page( $core );
|
235 |
$this->settings = new Boldgrid_Backup_Admin_Remote_Settings( $this->key );
|
236 |
+
|
237 |
+
$this->set_default_folder_name();
|
238 |
}
|
239 |
|
240 |
/**
|
281 |
if ( ! $contents || ! is_array( $contents ) ) {
|
282 |
$this->errors[] = __( 'Unable to get a directory listing from FTP server.', 'boldgrid-backup' );
|
283 |
return false;
|
284 |
+
} elseif ( in_array( $this->get_folder_name(), $contents, true ) ) {
|
285 |
return true;
|
286 |
}
|
287 |
|
288 |
switch ( $this->type ) {
|
289 |
case 'ftp':
|
290 |
+
$created = ftp_mkdir( $this->connection, $this->get_folder_name() );
|
291 |
break;
|
292 |
case 'sftp':
|
293 |
+
$created = $this->connection->mkdir( $this->get_folder_name() );
|
294 |
break;
|
295 |
}
|
296 |
|
301 |
'Unable to create the following directory on FTP server: %1$s',
|
302 |
'boldgrid-backup'
|
303 |
),
|
304 |
+
$this->get_folder_name()
|
305 |
);
|
306 |
}
|
307 |
|
333 |
$this->connect();
|
334 |
|
335 |
$local_filepath = $this->core->backup_dir->get_path_to( $filename );
|
336 |
+
$server_filepath = $this->get_folder_name() . '/' . $filename;
|
337 |
$success = false;
|
338 |
|
339 |
$this->log_in();
|
364 |
return;
|
365 |
}
|
366 |
|
367 |
+
$contents = $this->get_contents( true, $this->get_folder_name() );
|
368 |
$backups = $this->format_raw_contents( $contents );
|
369 |
|
370 |
$count_to_delete = count( $backups ) - $this->retention_count;
|
381 |
|
382 |
for ( $x = 0; $x < $count_to_delete; $x++ ) {
|
383 |
$filename = $backups[ $x ]['filename'];
|
384 |
+
$path = $this->get_folder_name() . '/' . $filename;
|
385 |
|
386 |
switch ( $this->type ) {
|
387 |
case 'ftp':
|
405 |
}
|
406 |
}
|
407 |
|
408 |
+
/**
|
409 |
+
* Get our ftp folder name.
|
410 |
+
*
|
411 |
+
* @since 1.9.1
|
412 |
+
*
|
413 |
+
* @return string
|
414 |
+
*/
|
415 |
+
public function get_folder_name() {
|
416 |
+
if ( ! empty( $this->folder_name ) ) {
|
417 |
+
return $this->folder_name;
|
418 |
+
}
|
419 |
+
|
420 |
+
$settings = $this->core->settings->get_settings();
|
421 |
+
$has_settings = isset( $settings['remote'][ $this->key ] );
|
422 |
+
$has_folder_set = ! empty( $settings['remote'][ $this->key ]['folder_name'] );
|
423 |
+
|
424 |
+
/*
|
425 |
+
* In version 1, no folder name was configurable by the user and it defaulted to
|
426 |
+
* "boldgrid-backup" ($this->remote_dir, which was removed in 1.9.1). In version 2, the user
|
427 |
+
* can set a custom folder name.
|
428 |
+
*
|
429 |
+
* This is for backwards compatibility.
|
430 |
+
*/
|
431 |
+
$version = $has_settings && ! $has_folder_set ? 1 : 2;
|
432 |
+
|
433 |
+
switch ( $version ) {
|
434 |
+
case 1:
|
435 |
+
$this->folder_name = 'boldgrid_backup';
|
436 |
+
break;
|
437 |
+
case 2:
|
438 |
+
$this->folder_name = $has_folder_set ? $settings['remote'][ $this->key ]['folder_name'] : $this->default_folder_name;
|
439 |
+
break;
|
440 |
+
}
|
441 |
+
|
442 |
+
return $this->folder_name;
|
443 |
+
}
|
444 |
+
|
445 |
/**
|
446 |
* Get our settings from $_POST.
|
447 |
*
|
448 |
+
* For example, if we are saving our FTP settings, get all the data the user set from $_POST.
|
449 |
+
*
|
450 |
* @since 1.6.0
|
451 |
*
|
452 |
* @return array
|
469 |
'key' => 'pass',
|
470 |
'default' => null,
|
471 |
),
|
472 |
+
array(
|
473 |
+
'key' => 'folder_name',
|
474 |
+
'default' => $this->get_folder_name(),
|
475 |
+
'callback' => 'sanitize_file_name',
|
476 |
+
),
|
477 |
array(
|
478 |
'key' => 'type',
|
479 |
'default' => $this->default_type,
|
943 |
$this->type = $this->default_type;
|
944 |
}
|
945 |
|
946 |
+
/**
|
947 |
+
* Set our default_folder_name.
|
948 |
+
*
|
949 |
+
* @since 1.9.1
|
950 |
+
*/
|
951 |
+
public function set_default_folder_name() {
|
952 |
+
$site_url = get_site_url();
|
953 |
+
$site_url = str_replace( 'https://', '', $site_url );
|
954 |
+
$site_url = str_replace( 'http://', '', $site_url );
|
955 |
+
$site_url = str_replace( '/', '-', $site_url );
|
956 |
+
$site_url = str_replace( '.', '-', $site_url );
|
957 |
+
|
958 |
+
$this->default_folder_name = sanitize_file_name( 'boldgrid-backup-' . $site_url );
|
959 |
+
}
|
960 |
+
|
961 |
/**
|
962 |
* Set our ftp password.
|
963 |
*
|
977 |
* @param string $filepath File path.
|
978 |
*/
|
979 |
public function is_uploaded( $filepath ) {
|
980 |
+
$contents = $this->get_contents( false, $this->get_folder_name() );
|
981 |
|
982 |
return ! is_array( $contents ) ? false : in_array( basename( $filepath ), $contents, true );
|
983 |
}
|
991 |
* @return bool
|
992 |
*/
|
993 |
public function upload( $filepath ) {
|
994 |
+
$remote_file = $this->get_folder_name() . '/' . basename( $filepath );
|
995 |
|
996 |
$timestamp = filemtime( $filepath );
|
997 |
|
admin/remote/class-boldgrid-backup-admin-sftp.php
DELETED
@@ -1,563 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-boldgrid-backup-admin-sftp.php
|
4 |
-
*
|
5 |
-
* @link https://www.boldgrid.com
|
6 |
-
* @since 1.6.0
|
7 |
-
*
|
8 |
-
* @package Boldgrid_Backup
|
9 |
-
* @subpackage Boldgrid_Backup/admin/remote
|
10 |
-
* @copyright BoldGrid
|
11 |
-
* @version $Id$
|
12 |
-
* @author BoldGrid <support@boldgrid.com>
|
13 |
-
*/
|
14 |
-
|
15 |
-
// phpcs:disable WordPress.VIP
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Class: Boldgrid_Backup_Admin_Sftp
|
19 |
-
*
|
20 |
-
* @since 1.6.0
|
21 |
-
*/
|
22 |
-
class Boldgrid_Backup_Admin_Sftp {
|
23 |
-
/**
|
24 |
-
* An SFTP connection.
|
25 |
-
*
|
26 |
-
* @since 1.6.0
|
27 |
-
* @access private
|
28 |
-
* @var Resource
|
29 |
-
*/
|
30 |
-
private $connection = null;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* The core class object.
|
34 |
-
*
|
35 |
-
* @since 1.6.0
|
36 |
-
* @access private
|
37 |
-
* @var Boldgrid_Backup_Admin_Core
|
38 |
-
*/
|
39 |
-
private $core;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Hooks class.
|
43 |
-
*
|
44 |
-
* @since 1.6.0
|
45 |
-
* @access public
|
46 |
-
* @var Boldgrid_Backup_Admin_Sftp_Hooks
|
47 |
-
*/
|
48 |
-
public $hooks;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* SFTP host.
|
52 |
-
*
|
53 |
-
* @since 1.6.0
|
54 |
-
* @access private
|
55 |
-
* @var string
|
56 |
-
*/
|
57 |
-
private $host = null;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Whether or not we have logged in.
|
61 |
-
*
|
62 |
-
* @since 1.6.0
|
63 |
-
* @access public
|
64 |
-
* @var bool
|
65 |
-
*/
|
66 |
-
public $logged_in = false;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Our key / label for sftp.
|
70 |
-
*
|
71 |
-
* @since 1.6.0
|
72 |
-
* @access public
|
73 |
-
* @var string
|
74 |
-
*/
|
75 |
-
public $key = 'sftp';
|
76 |
-
|
77 |
-
/**
|
78 |
-
* SFTP password.
|
79 |
-
*
|
80 |
-
* @since 1.6.0
|
81 |
-
* @access private
|
82 |
-
* @var string
|
83 |
-
*/
|
84 |
-
private $pass = null;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* SFTP port.
|
88 |
-
*
|
89 |
-
* @since 1.6.0
|
90 |
-
* @access public
|
91 |
-
* @var int
|
92 |
-
*/
|
93 |
-
public $port = 22;
|
94 |
-
|
95 |
-
/**
|
96 |
-
* SFTP remote directory.
|
97 |
-
*
|
98 |
-
* @since 1.6.0
|
99 |
-
* @access public
|
100 |
-
* @var string
|
101 |
-
*/
|
102 |
-
public $remote_dir = 'boldgrid_backup';
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Retention count.
|
106 |
-
*
|
107 |
-
* @since 1.6.0
|
108 |
-
* @access public
|
109 |
-
* @var int $retention_count
|
110 |
-
*/
|
111 |
-
public $retention_count = 5;
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Our title / label for sftp.
|
115 |
-
*
|
116 |
-
* @since 1.6.0
|
117 |
-
* @access public
|
118 |
-
* @var string
|
119 |
-
*/
|
120 |
-
public $title = 'SFTP';
|
121 |
-
|
122 |
-
/**
|
123 |
-
* SFTP username.
|
124 |
-
*
|
125 |
-
* @since 1.6.0
|
126 |
-
* @access private
|
127 |
-
* @var string
|
128 |
-
*/
|
129 |
-
private $user = null;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Constructor.
|
133 |
-
*
|
134 |
-
* @since 1.6.0
|
135 |
-
*
|
136 |
-
* @param Boldgrid_Backup_Admin_Core $core Core class object.
|
137 |
-
*/
|
138 |
-
public function __construct( $core ) {
|
139 |
-
include_once BOLDGRID_BACKUP_PATH . '/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php';
|
140 |
-
|
141 |
-
$this->core = $core;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Connect to our sftp server.
|
146 |
-
*
|
147 |
-
* @since 1.6.0
|
148 |
-
*/
|
149 |
-
public function connect() {
|
150 |
-
if ( ! empty( $this->connection ) ) {
|
151 |
-
return;
|
152 |
-
}
|
153 |
-
|
154 |
-
$this->init();
|
155 |
-
|
156 |
-
if ( empty( $this->user ) || empty( $this->pass ) || empty( $this->host ) ) {
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
$this->connection = new phpseclib\Net\SFTP( $this->host, $this->port );
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Create backup directory on remote host.
|
165 |
-
*
|
166 |
-
* @since 1.6.0
|
167 |
-
*
|
168 |
-
* @return bool False when we were unable to create directory.
|
169 |
-
*/
|
170 |
-
public function create_backup_dir() {
|
171 |
-
$this->connect();
|
172 |
-
$this->log_in();
|
173 |
-
if ( ! $this->logged_in ) {
|
174 |
-
return false;
|
175 |
-
}
|
176 |
-
|
177 |
-
$contents = $this->get_contents();
|
178 |
-
if ( in_array( $this->remote_dir, $contents, true ) ) {
|
179 |
-
return true;
|
180 |
-
}
|
181 |
-
|
182 |
-
return $this->connection->mkdir( $this->remote_dir );
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Disconnect from SFTP server.
|
187 |
-
*
|
188 |
-
* @since 1.6.0
|
189 |
-
*/
|
190 |
-
public function disconnect() {
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Enforce retention.
|
195 |
-
*
|
196 |
-
* @since 1.6.0
|
197 |
-
*/
|
198 |
-
public function enforce_retention() {
|
199 |
-
if ( empty( $this->retention_count ) ) {
|
200 |
-
return;
|
201 |
-
}
|
202 |
-
|
203 |
-
$backups = array();
|
204 |
-
$contents = $this->get_contents( true, $this->remote_dir );
|
205 |
-
|
206 |
-
// The contents usually include . and .., so remove 2 from list.
|
207 |
-
$count_to_delete = count( $contents ) - $this->retention_count - 2;
|
208 |
-
|
209 |
-
if ( ! is_array( $contents ) || $count_to_delete <= 0 ) {
|
210 |
-
return false;
|
211 |
-
}
|
212 |
-
|
213 |
-
$backups = $this->format_raw_contents( $contents );
|
214 |
-
|
215 |
-
usort(
|
216 |
-
$backups, function( $a, $b ) {
|
217 |
-
return $a['time'] < $b['time'] ? -1 : 1;
|
218 |
-
}
|
219 |
-
);
|
220 |
-
|
221 |
-
for ( $x = 0; $x < $count_to_delete; $x++ ) {
|
222 |
-
$filename = $backups[ $x ]['filename'];
|
223 |
-
$this->connection->delete( $this->remote_dir . '/' . $filename );
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Remote file deleted due to remote retention settings.
|
227 |
-
*
|
228 |
-
* @since 1.6.0
|
229 |
-
*/
|
230 |
-
do_action(
|
231 |
-
'boldgrid_backup_remote_retention_deleted',
|
232 |
-
$this->title,
|
233 |
-
$filename
|
234 |
-
);
|
235 |
-
}
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Format raw contents.
|
240 |
-
*
|
241 |
-
* This method takes in raw contents and returns an array of backups, with
|
242 |
-
* keys defining timestamp and filename.
|
243 |
-
*
|
244 |
-
* @since 1.6.0
|
245 |
-
*
|
246 |
-
* @param array $contents Raw contents received from this->get_contents.
|
247 |
-
* @return array {
|
248 |
-
* An array of backups.
|
249 |
-
*
|
250 |
-
* @type int $time Timestamp file was uploaded to sftp server.
|
251 |
-
* @type string $filename
|
252 |
-
* }
|
253 |
-
*/
|
254 |
-
public function format_raw_contents( $contents ) {
|
255 |
-
$skips = array( '.', '..' );
|
256 |
-
$backups = array();
|
257 |
-
|
258 |
-
if ( ! is_array( $contents ) ) {
|
259 |
-
return array();
|
260 |
-
}
|
261 |
-
|
262 |
-
foreach ( $contents as $item ) {
|
263 |
-
$exploded_item = explode( ' ', $item );
|
264 |
-
|
265 |
-
$count = count( $exploded_item );
|
266 |
-
|
267 |
-
$filename = $exploded_item[ $count - 1 ];
|
268 |
-
|
269 |
-
if ( in_array( $filename, $skips, true ) ) {
|
270 |
-
continue;
|
271 |
-
}
|
272 |
-
|
273 |
-
// Get the timestamp.
|
274 |
-
$month = $exploded_item[ $count - 4 ];
|
275 |
-
$day = $exploded_item[ $count - 3 ];
|
276 |
-
$time = $exploded_item[ $count - 2 ];
|
277 |
-
$time = strtotime( $month . ' ' . $day . ' ' . $time );
|
278 |
-
|
279 |
-
$backups[] = array(
|
280 |
-
'time' => $time,
|
281 |
-
'filename' => $filename,
|
282 |
-
);
|
283 |
-
}
|
284 |
-
|
285 |
-
return $backups;
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Get the remote contents / listing.
|
290 |
-
*
|
291 |
-
* @since 1.6.0
|
292 |
-
*
|
293 |
-
* @param bool $raw Whether to get the raw contents (sftp_rawlist) or not
|
294 |
-
* (sftp_nlist).
|
295 |
-
* @param string $dir The directory to get listing of.
|
296 |
-
* @return mixed
|
297 |
-
*/
|
298 |
-
public function get_contents( $raw = false, $dir = '.' ) {
|
299 |
-
$this->connect();
|
300 |
-
$this->log_in();
|
301 |
-
if ( ! $this->logged_in ) {
|
302 |
-
return array();
|
303 |
-
}
|
304 |
-
|
305 |
-
if ( $raw ) {
|
306 |
-
return $this->connection->rawlist( $dir );
|
307 |
-
} else {
|
308 |
-
return $this->connection->nlist( $dir );
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Get settings.
|
314 |
-
*
|
315 |
-
* @since 1.6.0
|
316 |
-
*/
|
317 |
-
public function get_details() {
|
318 |
-
$settings = $this->core->settings->get_settings();
|
319 |
-
|
320 |
-
return array(
|
321 |
-
'title' => $this->title,
|
322 |
-
'key' => $this->key,
|
323 |
-
'configure' => 'admin.php?page=boldgrid-backup-sftp',
|
324 |
-
'is_setup' => $this->is_setup(),
|
325 |
-
'enabled' => ! empty( $settings['remote'][ $this->key ]['enabled'] ) && $settings['remote'][ $this->key ]['enabled'] && $this->is_setup(),
|
326 |
-
);
|
327 |
-
}
|
328 |
-
|
329 |
-
/**
|
330 |
-
* Init properties.
|
331 |
-
*
|
332 |
-
* @since 1.6.0
|
333 |
-
*/
|
334 |
-
public function init() {
|
335 |
-
if ( ! empty( $this->user ) || ! empty( $this->pass ) || ! empty( $this->host ) ) {
|
336 |
-
return;
|
337 |
-
}
|
338 |
-
|
339 |
-
$settings = $this->core->settings->get_settings();
|
340 |
-
|
341 |
-
$labels = array( 'user', 'pass', 'host', 'port', 'retention_count' );
|
342 |
-
|
343 |
-
foreach ( $labels as $label ) {
|
344 |
-
$this->$label = ! empty( $settings['remote'][ $this->key ][ $label ] ) ? $settings['remote'][ $this->key ][ $label ] : null;
|
345 |
-
}
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Determine whether or not SFTP is setup.
|
350 |
-
*
|
351 |
-
* @since 1.6.0
|
352 |
-
*
|
353 |
-
* @return bool
|
354 |
-
*/
|
355 |
-
public function is_setup() {
|
356 |
-
$this->connect();
|
357 |
-
$this->log_in();
|
358 |
-
|
359 |
-
return $this->logged_in;
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Determine if a set of SFTP credentials are valid.
|
364 |
-
*
|
365 |
-
* @since 1.6.0
|
366 |
-
*
|
367 |
-
* @param string $host Hostname.
|
368 |
-
* @param string $user Username.
|
369 |
-
* @param string $pass Password.
|
370 |
-
* @param int $port Port number.
|
371 |
-
* @return bool
|
372 |
-
*/
|
373 |
-
public function is_valid_credentials( $host, $user, $pass, $port ) {
|
374 |
-
$connection = new phpseclib\Net\SFTP( $host, $port );
|
375 |
-
if ( ! $connection ) {
|
376 |
-
return false;
|
377 |
-
}
|
378 |
-
|
379 |
-
$logged_in = @$connection->login( $user, $pass ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
|
380 |
-
if ( ! $logged_in ) {
|
381 |
-
$this->errors[] = __( 'Unable to connect and log in.', 'boldgrid-backup' );
|
382 |
-
return false;
|
383 |
-
}
|
384 |
-
|
385 |
-
return true;
|
386 |
-
}
|
387 |
-
|
388 |
-
/**
|
389 |
-
* Log into the SFTP server.
|
390 |
-
*
|
391 |
-
* @since 1.6.0
|
392 |
-
*
|
393 |
-
* @return bool
|
394 |
-
*/
|
395 |
-
public function log_in() {
|
396 |
-
if ( $this->logged_in ) {
|
397 |
-
return;
|
398 |
-
}
|
399 |
-
|
400 |
-
$this->connect();
|
401 |
-
if ( empty( $this->connection ) ) {
|
402 |
-
return false;
|
403 |
-
}
|
404 |
-
|
405 |
-
$this->logged_in = $this->connection->login( $this->user, $this->pass );
|
406 |
-
if ( ! $this->logged_in ) {
|
407 |
-
$this->disconnect();
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
/**
|
412 |
-
* Is file uploaded?
|
413 |
-
*
|
414 |
-
* @since 1.6.0
|
415 |
-
*
|
416 |
-
* @param string $filepath File path.
|
417 |
-
*/
|
418 |
-
public function is_uploaded( $filepath ) {
|
419 |
-
$contents = $this->get_contents( false, $this->remote_dir );
|
420 |
-
|
421 |
-
return ! is_array( $contents ) ? false : in_array( basename( $filepath ), $contents, true );
|
422 |
-
}
|
423 |
-
|
424 |
-
/**
|
425 |
-
* Generate the submenu page for our SFTP Settings page.
|
426 |
-
*
|
427 |
-
* @since 1.6.0
|
428 |
-
*/
|
429 |
-
public function submenu_page() {
|
430 |
-
wp_enqueue_style( 'boldgrid-backup-admin-hide-all' );
|
431 |
-
|
432 |
-
$this->submenu_page_save();
|
433 |
-
|
434 |
-
$settings = $this->core->settings->get_settings();
|
435 |
-
|
436 |
-
$host = ! empty( $settings['remote'][ $this->key ]['host'] ) ? $settings['remote'][ $this->key ]['host'] : null;
|
437 |
-
$user = ! empty( $settings['remote'][ $this->key ]['user'] ) ? $settings['remote'][ $this->key ]['user'] : null;
|
438 |
-
$pass = ! empty( $settings['remote'][ $this->key ]['pass'] ) ? $settings['remote'][ $this->key ]['pass'] : null;
|
439 |
-
$port = ! empty( $settings['remote'][ $this->key ]['port'] ) ? $settings['remote'][ $this->key ]['port'] : $this->port;
|
440 |
-
$retention_count = ! empty( $settings['remote'][ $this->key ]['retention_count'] ) ? $settings['remote'][ $this->key ]['retention_count'] : $this->retention_count;
|
441 |
-
|
442 |
-
include BOLDGRID_BACKUP_PATH . '/admin/partials/remote/sftp.php';
|
443 |
-
}
|
444 |
-
|
445 |
-
/**
|
446 |
-
* Process the user's request to update their SFTP settings.
|
447 |
-
*
|
448 |
-
* @since 1.6.0
|
449 |
-
*/
|
450 |
-
public function submenu_page_save() {
|
451 |
-
if ( ! current_user_can( 'update_plugins' ) ) {
|
452 |
-
return false;
|
453 |
-
}
|
454 |
-
|
455 |
-
// phpcs:disable WordPress.CSRF.NonceVerification.NoNonceVerification, WordPress.Security.NonceVerification.NoNonceVerification
|
456 |
-
|
457 |
-
if ( empty( $_POST ) ) {
|
458 |
-
return false;
|
459 |
-
}
|
460 |
-
|
461 |
-
$settings = $this->core->settings->get_settings();
|
462 |
-
if ( ! isset( $settings['remote'][ $this->key ] ) || ! is_array( $settings['remote'][ $this->key ] ) ) {
|
463 |
-
$settings['remote'][ $this->key ] = array();
|
464 |
-
}
|
465 |
-
|
466 |
-
/*
|
467 |
-
* If the user has requested to delete all their settings, do that now
|
468 |
-
* and return.
|
469 |
-
*/
|
470 |
-
if ( __( 'Delete settings', 'boldgrid-backup' ) === $_POST['submit'] ) {
|
471 |
-
$settings['remote'][ $this->key ] = array();
|
472 |
-
update_site_option( 'boldgrid_backup_settings', $settings );
|
473 |
-
|
474 |
-
$this->host = null;
|
475 |
-
$this->user = null;
|
476 |
-
$this->pass = null;
|
477 |
-
$this->retention_count = null;
|
478 |
-
$this->disconnect();
|
479 |
-
|
480 |
-
do_action( 'boldgrid_backup_notice', __( 'Settings saved.', 'boldgrid-backup' ), 'notice updated is-dismissible' );
|
481 |
-
return;
|
482 |
-
}
|
483 |
-
|
484 |
-
$errors = array();
|
485 |
-
|
486 |
-
// Get and validate our credentials.
|
487 |
-
$host = ! empty( $_POST['host'] ) ? sanitize_file_name( $_POST['host'] ) : null;
|
488 |
-
$user = ! empty( $_POST['user'] ) ? sanitize_text_field( $_POST['user'] ) : null;
|
489 |
-
$pass = ! empty( $_POST['pass'] ) ? $_POST['pass'] : null;
|
490 |
-
$port = ! empty( $_POST['port'] ) ? (int) $_POST['port'] : $this->port;
|
491 |
-
|
492 |
-
$valid_credentials = $this->is_valid_credentials( $host, $user, $pass, $port );
|
493 |
-
|
494 |
-
if ( $valid_credentials ) {
|
495 |
-
$settings['remote'][ $this->key ]['host'] = $host;
|
496 |
-
$settings['remote'][ $this->key ]['user'] = $user;
|
497 |
-
$settings['remote'][ $this->key ]['pass'] = $pass;
|
498 |
-
$settings['remote'][ $this->key ]['port'] = $port;
|
499 |
-
} elseif ( empty( $this->errors ) ) {
|
500 |
-
$this->errors[] = __( 'Unknown error.', 'boldgrid-backup' );
|
501 |
-
}
|
502 |
-
|
503 |
-
$retention_count = ! empty( $_POST['retention_count'] ) &&
|
504 |
-
is_numeric( $_POST['retention_count'] ) ?
|
505 |
-
(int) $_POST['retention_count'] : $this->retention_count;
|
506 |
-
|
507 |
-
$settings['remote'][ $this->key ]['retention_count'] = $retention_count;
|
508 |
-
|
509 |
-
if ( ! empty( $this->errors ) ) {
|
510 |
-
do_action( 'boldgrid_backup_notice', implode( '<br /><br />', $this->errors ) );
|
511 |
-
} else {
|
512 |
-
update_site_option( 'boldgrid_backup_settings', $settings );
|
513 |
-
do_action( 'boldgrid_backup_notice', __( 'Settings saved.', 'boldgrid-backup' ), 'notice updated is-dismissible' );
|
514 |
-
}
|
515 |
-
|
516 |
-
// phpcs:enable WordPress.CSRF.NonceVerification.NoNonceVerification, WordPress.Security.NonceVerification.NoNonceVerification
|
517 |
-
}
|
518 |
-
|
519 |
-
/**
|
520 |
-
* Upload a file.
|
521 |
-
*
|
522 |
-
* @since 1.6.0
|
523 |
-
*
|
524 |
-
* @param string $filepath File path.
|
525 |
-
* @return bool
|
526 |
-
*/
|
527 |
-
public function upload( $filepath ) {
|
528 |
-
$remote_file = $this->remote_dir . '/' . basename( $filepath );
|
529 |
-
|
530 |
-
$this->connect();
|
531 |
-
$this->log_in();
|
532 |
-
if ( ! $this->logged_in ) {
|
533 |
-
$this->errors[] = __( 'Unable to log in to sftp server.', 'boldgrid-backup' );
|
534 |
-
return false;
|
535 |
-
}
|
536 |
-
|
537 |
-
$has_remote_dir = $this->create_backup_dir();
|
538 |
-
if ( ! $has_remote_dir ) {
|
539 |
-
$this->errors[] = sprint_f(
|
540 |
-
// translators: 1: Remote directory path.
|
541 |
-
__(
|
542 |
-
'Unable to create the following directory on SFTP server: %1$s',
|
543 |
-
'boldgrid-backup'
|
544 |
-
),
|
545 |
-
$this->remote_dir
|
546 |
-
);
|
547 |
-
return false;
|
548 |
-
}
|
549 |
-
|
550 |
-
$uploaded = $this->connection->put( $remote_file, $filepath, NET_SFTP_LOCAL_FILE );
|
551 |
-
if ( ! $uploaded ) {
|
552 |
-
$this->disconnect();
|
553 |
-
$this->errors[] = __( 'Unable to upload file.', 'boldgrid-backup' );
|
554 |
-
return false;
|
555 |
-
}
|
556 |
-
|
557 |
-
$this->enforce_retention();
|
558 |
-
|
559 |
-
$this->disconnect();
|
560 |
-
|
561 |
-
return true;
|
562 |
-
}
|
563 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boldgrid-backup.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: BoldGrid Backup
|
17 |
* Plugin URI: https://www.boldgrid.com/boldgrid-backup/
|
18 |
* Description: BoldGrid Backup provides WordPress backup and restoration with update protection.
|
19 |
-
* Version: 1.9.
|
20 |
* Author: BoldGrid
|
21 |
* Author URI: https://www.boldgrid.com/
|
22 |
* License: GPL-2.0+
|
16 |
* Plugin Name: BoldGrid Backup
|
17 |
* Plugin URI: https://www.boldgrid.com/boldgrid-backup/
|
18 |
* Description: BoldGrid Backup provides WordPress backup and restoration with update protection.
|
19 |
+
* Version: 1.9.1
|
20 |
* Author: BoldGrid
|
21 |
* Author URI: https://www.boldgrid.com/
|
22 |
* License: GPL-2.0+
|
coverage.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<coverage generated="
|
3 |
-
<project timestamp="
|
4 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-archive-actions.php">
|
5 |
<class name="Boldgrid_Backup_Admin_Archive_Actions" namespace="global" fullPackage="Boldgrid.Backup.Admin.Archive">
|
6 |
<metrics complexity="15" methods="7" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="110" coveredstatements="2" elements="117" coveredelements="3"/>
|
@@ -3979,156 +3979,156 @@
|
|
3979 |
<class name="Boldgrid_Backup_Admin_In_Progress_Data" namespace="global" fullPackage="Boldgrid.Backup.Admin.In.Progress">
|
3980 |
<metrics complexity="9" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="29" coveredstatements="0" elements="35" coveredelements="0"/>
|
3981 |
</class>
|
3982 |
-
<line num="
|
|
|
3983 |
<line num="40" type="stmt" count="0"/>
|
|
|
3984 |
<line num="42" type="stmt" count="0"/>
|
3985 |
-
<line num="43" type="stmt" count="0"/>
|
3986 |
<line num="44" type="stmt" count="0"/>
|
3987 |
-
<line num="
|
3988 |
-
<line num="
|
3989 |
-
<line num="56" type="
|
3990 |
-
<line num="
|
3991 |
<line num="59" type="stmt" count="0"/>
|
3992 |
-
<line num="
|
3993 |
-
<line num="69" type="
|
3994 |
<line num="70" type="stmt" count="0"/>
|
3995 |
-
<line num="
|
3996 |
-
<line num="
|
3997 |
-
<line num="81" type="stmt" count="0"/>
|
3998 |
-
<line num="83" type="stmt" count="0"/>
|
3999 |
<line num="84" type="stmt" count="0"/>
|
4000 |
<line num="85" type="stmt" count="0"/>
|
4001 |
<line num="86" type="stmt" count="0"/>
|
4002 |
<line num="87" type="stmt" count="0"/>
|
4003 |
-
<line num="
|
4004 |
<line num="90" type="stmt" count="0"/>
|
4005 |
<line num="91" type="stmt" count="0"/>
|
4006 |
<line num="92" type="stmt" count="0"/>
|
4007 |
-
<line num="
|
4008 |
<line num="95" type="stmt" count="0"/>
|
4009 |
-
<line num="
|
4010 |
-
<line num="106" type="
|
4011 |
-
<line num="
|
4012 |
-
<line num="
|
4013 |
<line num="111" type="stmt" count="0"/>
|
4014 |
-
<line num="
|
4015 |
-
<line num="121" type="
|
4016 |
<line num="122" type="stmt" count="0"/>
|
4017 |
-
<
|
|
|
4018 |
</file>
|
4019 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-in-progress.php">
|
4020 |
<class name="Boldgrid_Backup_Admin_In_Progress" namespace="global" fullPackage="Boldgrid.Backup.Admin.In">
|
4021 |
<metrics complexity="31" methods="13" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="84" coveredstatements="2" elements="97" coveredelements="3"/>
|
4022 |
</class>
|
4023 |
-
<line num="
|
|
|
4024 |
<line num="50" type="stmt" count="12"/>
|
4025 |
-
<line num="
|
4026 |
-
<line num="61" type="
|
4027 |
-
<line num="
|
4028 |
<line num="64" type="stmt" count="0"/>
|
4029 |
-
<line num="
|
4030 |
-
<line num="
|
4031 |
-
<line num="
|
4032 |
<line num="77" type="stmt" count="0"/>
|
4033 |
-
<line num="
|
4034 |
<line num="80" type="stmt" count="0"/>
|
4035 |
<line num="81" type="stmt" count="0"/>
|
4036 |
-
<line num="
|
4037 |
<line num="89" type="stmt" count="0"/>
|
4038 |
<line num="90" type="stmt" count="0"/>
|
4039 |
-
<line num="
|
4040 |
-
<line num="
|
4041 |
<line num="95" type="stmt" count="0"/>
|
4042 |
-
<line num="
|
4043 |
-
<line num="
|
4044 |
-
<line num="
|
4045 |
-
<line num="110" type="
|
4046 |
-
<line num="
|
4047 |
<line num="113" type="stmt" count="0"/>
|
4048 |
<line num="114" type="stmt" count="0"/>
|
4049 |
-
<line num="
|
4050 |
<line num="117" type="stmt" count="0"/>
|
4051 |
-
<line num="
|
4052 |
-
<line num="129" type="
|
4053 |
-
<line num="
|
4054 |
-
<line num="
|
4055 |
-
<line num="
|
4056 |
-
<line num="144" type="
|
4057 |
-
<line num="
|
4058 |
<line num="147" type="stmt" count="0"/>
|
4059 |
-
<line num="
|
4060 |
-
<line num="
|
4061 |
<line num="158" type="stmt" count="0"/>
|
4062 |
-
<line num="
|
4063 |
<line num="161" type="stmt" count="0"/>
|
4064 |
<line num="162" type="stmt" count="0"/>
|
4065 |
<line num="163" type="stmt" count="0"/>
|
4066 |
-
<line num="
|
4067 |
-
<line num="
|
4068 |
-
<line num="177" type="
|
4069 |
<line num="178" type="stmt" count="0"/>
|
4070 |
-
<line num="
|
4071 |
<line num="181" type="stmt" count="0"/>
|
4072 |
<line num="182" type="stmt" count="0"/>
|
4073 |
-
<line num="
|
4074 |
-
<line num="
|
4075 |
-
<line num="198" type="
|
4076 |
-
<line num="
|
4077 |
-
<line num="
|
4078 |
<line num="207" type="stmt" count="0"/>
|
4079 |
-
<line num="208" type="
|
4080 |
-
<line num="209" type="
|
4081 |
-
<line num="
|
4082 |
<line num="212" type="stmt" count="0"/>
|
4083 |
-
<line num="
|
4084 |
<line num="215" type="stmt" count="0"/>
|
4085 |
<line num="216" type="stmt" count="0"/>
|
4086 |
-
<line num="
|
4087 |
<line num="220" type="stmt" count="0"/>
|
4088 |
<line num="221" type="stmt" count="0"/>
|
4089 |
<line num="222" type="stmt" count="0"/>
|
4090 |
<line num="223" type="stmt" count="0"/>
|
4091 |
-
<line num="
|
4092 |
-
<line num="
|
4093 |
-
<line num="241" type="
|
4094 |
-
<line num="
|
4095 |
<line num="244" type="stmt" count="0"/>
|
4096 |
-
<line num="
|
4097 |
-
<line num="
|
4098 |
-
<line num="
|
4099 |
-
<line num="
|
4100 |
<line num="257" type="stmt" count="0"/>
|
4101 |
<line num="258" type="stmt" count="0"/>
|
4102 |
<line num="259" type="stmt" count="0"/>
|
4103 |
<line num="260" type="stmt" count="0"/>
|
4104 |
<line num="261" type="stmt" count="0"/>
|
4105 |
-
<line num="
|
4106 |
-
<line num="
|
4107 |
-
<line num="
|
4108 |
<line num="279" type="stmt" count="0"/>
|
4109 |
<line num="280" type="stmt" count="0"/>
|
4110 |
<line num="281" type="stmt" count="0"/>
|
4111 |
-
<line num="
|
4112 |
-
<line num="
|
4113 |
<line num="300" type="stmt" count="0"/>
|
4114 |
<line num="301" type="stmt" count="0"/>
|
4115 |
-
<line num="
|
4116 |
-
<line num="311" type="
|
4117 |
-
<line num="
|
4118 |
-
<line num="
|
4119 |
<line num="316" type="stmt" count="0"/>
|
4120 |
-
<line num="
|
4121 |
-
<line num="324" type="
|
4122 |
<line num="325" type="stmt" count="0"/>
|
4123 |
<line num="326" type="stmt" count="0"/>
|
4124 |
-
<line num="
|
4125 |
<line num="329" type="stmt" count="0"/>
|
4126 |
<line num="330" type="stmt" count="0"/>
|
4127 |
-
<line num="
|
4128 |
-
<line num="
|
4129 |
<line num="335" type="stmt" count="0"/>
|
4130 |
-
<
|
4131 |
-
<metrics loc="337" ncloc="171" classes="1" methods="13" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="95" coveredstatements="2" elements="108" coveredelements="3"/>
|
4132 |
</file>
|
4133 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-jobs.php">
|
4134 |
<class name="Boldgrid_Backup_Admin_Jobs" namespace="global" fullPackage="Boldgrid.Backup.Admin">
|
@@ -8079,64 +8079,68 @@
|
|
8079 |
<metrics loc="62" ncloc="32" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="21" coveredstatements="0" elements="21" coveredelements="0"/>
|
8080 |
</file>
|
8081 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/partials/remote/ftp.php">
|
8082 |
-
<line num="
|
8083 |
-
<line num="18" type="stmt" count="0"/>
|
8084 |
-
<line num="19" type="stmt" count="0"/>
|
8085 |
<line num="21" type="stmt" count="0"/>
|
|
|
8086 |
<line num="24" type="stmt" count="0"/>
|
8087 |
-
<line num="25" type="stmt" count="0"/>
|
8088 |
-
<line num="26" type="stmt" count="0"/>
|
8089 |
<line num="27" type="stmt" count="0"/>
|
|
|
8090 |
<line num="29" type="stmt" count="0"/>
|
8091 |
<line num="30" type="stmt" count="0"/>
|
8092 |
-
<line num="31" type="stmt" count="0"/>
|
8093 |
<line num="32" type="stmt" count="0"/>
|
8094 |
<line num="33" type="stmt" count="0"/>
|
8095 |
<line num="34" type="stmt" count="0"/>
|
8096 |
<line num="35" type="stmt" count="0"/>
|
8097 |
<line num="36" type="stmt" count="0"/>
|
8098 |
<line num="37" type="stmt" count="0"/>
|
|
|
8099 |
<line num="39" type="stmt" count="0"/>
|
8100 |
<line num="40" type="stmt" count="0"/>
|
8101 |
-
<line num="41" type="stmt" count="0"/>
|
8102 |
<line num="42" type="stmt" count="0"/>
|
8103 |
<line num="43" type="stmt" count="0"/>
|
|
|
8104 |
<line num="45" type="stmt" count="0"/>
|
|
|
8105 |
<line num="48" type="stmt" count="0"/>
|
8106 |
-
<line num="
|
8107 |
-
<line num="
|
8108 |
<line num="53" type="stmt" count="0"/>
|
8109 |
-
<line num="54" type="stmt" count="0"/>
|
8110 |
-
<line num="55" type="stmt" count="0"/>
|
8111 |
<line num="56" type="stmt" count="0"/>
|
|
|
|
|
8112 |
<line num="59" type="stmt" count="0"/>
|
8113 |
-
<line num="
|
8114 |
<line num="63" type="stmt" count="0"/>
|
8115 |
-
<line num="64" type="stmt" count="0"/>
|
8116 |
-
<line num="65" type="stmt" count="0"/>
|
8117 |
<line num="66" type="stmt" count="0"/>
|
|
|
|
|
8118 |
<line num="69" type="stmt" count="0"/>
|
8119 |
-
<line num="70" type="stmt" count="0"/>
|
8120 |
-
<line num="71" type="stmt" count="0"/>
|
8121 |
-
<line num="72" type="stmt" count="0"/>
|
8122 |
<line num="73" type="stmt" count="0"/>
|
|
|
|
|
8123 |
<line num="76" type="stmt" count="0"/>
|
8124 |
-
<line num="77" type="stmt" count="0"/>
|
8125 |
-
<line num="78" type="stmt" count="0"/>
|
8126 |
<line num="79" type="stmt" count="0"/>
|
8127 |
<line num="80" type="stmt" count="0"/>
|
|
|
8128 |
<line num="82" type="stmt" count="0"/>
|
8129 |
<line num="83" type="stmt" count="0"/>
|
8130 |
-
<line num="84" type="stmt" count="0"/>
|
8131 |
-
<line num="85" type="stmt" count="0"/>
|
8132 |
<line num="86" type="stmt" count="0"/>
|
|
|
8133 |
<line num="88" type="stmt" count="0"/>
|
8134 |
<line num="89" type="stmt" count="0"/>
|
8135 |
<line num="90" type="stmt" count="0"/>
|
|
|
8136 |
<line num="93" type="stmt" count="0"/>
|
8137 |
<line num="94" type="stmt" count="0"/>
|
8138 |
<line num="95" type="stmt" count="0"/>
|
8139 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8140 |
</file>
|
8141 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/partials/remote/local.php">
|
8142 |
<line num="21" type="stmt" count="0"/>
|
@@ -9285,7 +9289,7 @@
|
|
9285 |
</file>
|
9286 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp-page.php">
|
9287 |
<class name="Boldgrid_Backup_Admin_Ftp_Page" namespace="global" fullPackage="Boldgrid.Backup.Admin.Ftp">
|
9288 |
-
<metrics complexity="21" methods="5" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="
|
9289 |
</class>
|
9290 |
<line num="39" type="method" name="__construct" visibility="public" complexity="1" crap="1" count="12"/>
|
9291 |
<line num="40" type="stmt" count="12"/>
|
@@ -9319,480 +9323,509 @@
|
|
9319 |
<line num="91" type="stmt" count="0"/>
|
9320 |
<line num="92" type="stmt" count="0"/>
|
9321 |
<line num="93" type="stmt" count="0"/>
|
9322 |
-
<line num="96" type="stmt" count="0"/>
|
9323 |
-
<line num="98" type="stmt" count="0"/>
|
9324 |
-
<line num="99" type="stmt" count="0"/>
|
9325 |
<line num="100" type="stmt" count="0"/>
|
9326 |
-
<line num="101" type="stmt" count="0"/>
|
9327 |
<line num="102" type="stmt" count="0"/>
|
9328 |
<line num="103" type="stmt" count="0"/>
|
9329 |
<line num="104" type="stmt" count="0"/>
|
9330 |
<line num="105" type="stmt" count="0"/>
|
|
|
|
|
9331 |
<line num="108" type="stmt" count="0"/>
|
|
|
9332 |
<line num="110" type="stmt" count="0"/>
|
9333 |
<line num="113" type="stmt" count="0"/>
|
9334 |
-
<line num="114" type="stmt" count="0"/>
|
9335 |
<line num="115" type="stmt" count="0"/>
|
9336 |
-
<line num="116" type="stmt" count="0"/>
|
9337 |
-
<line num="117" type="stmt" count="0"/>
|
9338 |
<line num="118" type="stmt" count="0"/>
|
|
|
9339 |
<line num="120" type="stmt" count="0"/>
|
9340 |
<line num="121" type="stmt" count="0"/>
|
9341 |
<line num="122" type="stmt" count="0"/>
|
9342 |
<line num="123" type="stmt" count="0"/>
|
9343 |
-
<line num="124" type="stmt" count="0"/>
|
9344 |
<line num="125" type="stmt" count="0"/>
|
9345 |
<line num="126" type="stmt" count="0"/>
|
9346 |
<line num="127" type="stmt" count="0"/>
|
9347 |
<line num="128" type="stmt" count="0"/>
|
9348 |
<line num="129" type="stmt" count="0"/>
|
|
|
9349 |
<line num="131" type="stmt" count="0"/>
|
9350 |
<line num="132" type="stmt" count="0"/>
|
9351 |
-
<line num="
|
9352 |
-
<line num="
|
9353 |
-
<line num="
|
9354 |
-
<line num="
|
9355 |
-
<line num="
|
|
|
9356 |
<line num="147" type="stmt" count="0"/>
|
9357 |
<line num="148" type="stmt" count="0"/>
|
9358 |
-
<line num="149" type="stmt" count="0"/>
|
9359 |
<line num="151" type="stmt" count="0"/>
|
9360 |
<line num="152" type="stmt" count="0"/>
|
|
|
9361 |
<line num="154" type="stmt" count="0"/>
|
9362 |
-
<line num="
|
9363 |
<line num="157" type="stmt" count="0"/>
|
9364 |
-
<line num="
|
9365 |
-
<line num="
|
9366 |
-
<line num="
|
9367 |
-
<line num="
|
9368 |
-
<line num="
|
9369 |
-
<line num="172" type="stmt" count="0"/>
|
9370 |
<line num="173" type="stmt" count="0"/>
|
9371 |
<line num="175" type="stmt" count="0"/>
|
|
|
9372 |
<line num="177" type="stmt" count="0"/>
|
9373 |
-
<line num="
|
9374 |
-
<line num="
|
9375 |
-
<line num="
|
9376 |
-
<line num="
|
9377 |
<line num="188" type="stmt" count="0"/>
|
9378 |
-
<line num="
|
9379 |
<line num="192" type="stmt" count="0"/>
|
9380 |
<line num="193" type="stmt" count="0"/>
|
9381 |
-
<line num="194" type="stmt" count="0"/>
|
9382 |
<line num="196" type="stmt" count="0"/>
|
|
|
9383 |
<line num="198" type="stmt" count="0"/>
|
9384 |
-
<line num="
|
9385 |
-
<line num="201" type="stmt" count="0"/>
|
9386 |
<line num="202" type="stmt" count="0"/>
|
9387 |
-
<line num="203" type="stmt" count="0"/>
|
9388 |
<line num="204" type="stmt" count="0"/>
|
9389 |
-
<line num="205" type="stmt" count="0"/>
|
9390 |
<line num="206" type="stmt" count="0"/>
|
|
|
9391 |
<line num="208" type="stmt" count="0"/>
|
9392 |
<line num="209" type="stmt" count="0"/>
|
|
|
9393 |
<line num="211" type="stmt" count="0"/>
|
9394 |
<line num="212" type="stmt" count="0"/>
|
9395 |
-
<line num="213" type="stmt" count="0"/>
|
9396 |
<line num="214" type="stmt" count="0"/>
|
9397 |
<line num="215" type="stmt" count="0"/>
|
9398 |
<line num="216" type="stmt" count="0"/>
|
|
|
9399 |
<line num="219" type="stmt" count="0"/>
|
9400 |
-
<
|
|
|
|
|
|
|
|
|
|
|
9401 |
</file>
|
9402 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-ftp.php">
|
9403 |
<class name="Boldgrid_Backup_Admin_Ftp" namespace="global" fullPackage="Boldgrid.Backup.Admin">
|
9404 |
-
<metrics complexity="
|
9405 |
</class>
|
9406 |
-
<line num="
|
9407 |
-
<line num="
|
9408 |
-
<line num="
|
9409 |
-
<line num="
|
9410 |
-
<line num="
|
9411 |
-
<line num="
|
9412 |
-
<line num="
|
9413 |
-
<line num="
|
9414 |
-
<line num="
|
9415 |
-
<line num="234" type="stmt" count="0"/>
|
9416 |
-
<line num="237" type="stmt" count="0"/>
|
9417 |
-
<line num="239" type="stmt" count="0"/>
|
9418 |
-
<line num="240" type="stmt" count="0"/>
|
9419 |
-
<line num="243" type="stmt" count="0"/>
|
9420 |
-
<line num="244" type="stmt" count="0"/>
|
9421 |
-
<line num="245" type="stmt" count="0"/>
|
9422 |
<line num="246" type="stmt" count="0"/>
|
9423 |
<line num="247" type="stmt" count="0"/>
|
9424 |
-
<line num="248" type="stmt" count="0"/>
|
9425 |
-
<line num="249" type="stmt" count="0"/>
|
9426 |
<line num="250" type="stmt" count="0"/>
|
9427 |
-
<line num="
|
9428 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
9429 |
<line num="261" type="stmt" count="0"/>
|
9430 |
<line num="262" type="stmt" count="0"/>
|
9431 |
<line num="263" type="stmt" count="0"/>
|
9432 |
<line num="264" type="stmt" count="0"/>
|
9433 |
-
<line num="
|
9434 |
-
<line num="
|
9435 |
-
<line num="269" type="stmt" count="0"/>
|
9436 |
-
<line num="270" type="stmt" count="0"/>
|
9437 |
-
<line num="271" type="stmt" count="0"/>
|
9438 |
-
<line num="272" type="stmt" count="0"/>
|
9439 |
<line num="275" type="stmt" count="0"/>
|
9440 |
<line num="276" type="stmt" count="0"/>
|
9441 |
<line num="277" type="stmt" count="0"/>
|
9442 |
-
<line num="278" type="stmt" count="0"/>
|
9443 |
-
<line num="279" type="stmt" count="0"/>
|
9444 |
<line num="280" type="stmt" count="0"/>
|
9445 |
<line num="281" type="stmt" count="0"/>
|
9446 |
<line num="282" type="stmt" count="0"/>
|
|
|
9447 |
<line num="284" type="stmt" count="0"/>
|
9448 |
<line num="285" type="stmt" count="0"/>
|
9449 |
-
<line num="287" type="stmt" count="0"/>
|
9450 |
<line num="288" type="stmt" count="0"/>
|
|
|
9451 |
<line num="290" type="stmt" count="0"/>
|
9452 |
<line num="291" type="stmt" count="0"/>
|
9453 |
<line num="292" type="stmt" count="0"/>
|
9454 |
<line num="293" type="stmt" count="0"/>
|
|
|
9455 |
<line num="295" type="stmt" count="0"/>
|
9456 |
-
<line num="
|
|
|
|
|
|
|
|
|
9457 |
<line num="304" type="stmt" count="0"/>
|
9458 |
<line num="305" type="stmt" count="0"/>
|
9459 |
<line num="306" type="stmt" count="0"/>
|
9460 |
-
<line num="307" type="stmt" count="0"/>
|
9461 |
<line num="308" type="stmt" count="0"/>
|
9462 |
-
<line num="
|
9463 |
-
<line num="
|
|
|
|
|
9464 |
<line num="320" type="stmt" count="0"/>
|
|
|
9465 |
<line num="322" type="stmt" count="0"/>
|
9466 |
-
<line num="
|
9467 |
-
<line num="324" type="stmt" count="0"/>
|
9468 |
-
<line num="326" type="stmt" count="0"/>
|
9469 |
-
<line num="328" type="stmt" count="0"/>
|
9470 |
-
<line num="329" type="stmt" count="0"/>
|
9471 |
-
<line num="330" type="stmt" count="0"/>
|
9472 |
-
<line num="331" type="stmt" count="0"/>
|
9473 |
-
<line num="332" type="stmt" count="0"/>
|
9474 |
<line num="333" type="stmt" count="0"/>
|
9475 |
-
<line num="334" type="stmt" count="0"/>
|
9476 |
<line num="335" type="stmt" count="0"/>
|
|
|
9477 |
<line num="337" type="stmt" count="0"/>
|
9478 |
-
<line num="338" type="stmt" count="0"/>
|
9479 |
<line num="339" type="stmt" count="0"/>
|
9480 |
<line num="341" type="stmt" count="0"/>
|
9481 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
9482 |
<line num="350" type="stmt" count="0"/>
|
9483 |
<line num="351" type="stmt" count="0"/>
|
|
|
9484 |
<line num="354" type="stmt" count="0"/>
|
9485 |
-
<line num="
|
9486 |
-
<line num="357" type="stmt" count="0"/>
|
9487 |
-
<line num="359" type="stmt" count="0"/>
|
9488 |
-
<line num="360" type="stmt" count="0"/>
|
9489 |
<line num="363" type="stmt" count="0"/>
|
9490 |
-
<line num="
|
9491 |
<line num="367" type="stmt" count="0"/>
|
9492 |
-
<line num="
|
9493 |
<line num="370" type="stmt" count="0"/>
|
9494 |
-
<line num="
|
9495 |
<line num="373" type="stmt" count="0"/>
|
9496 |
-
<line num="374" type="stmt" count="0"/>
|
9497 |
-
<line num="375" type="stmt" count="0"/>
|
9498 |
<line num="376" type="stmt" count="0"/>
|
9499 |
-
<line num="377" type="stmt" count="0"/>
|
9500 |
<line num="378" type="stmt" count="0"/>
|
9501 |
-
<line num="379" type="stmt" count="0"/>
|
9502 |
<line num="380" type="stmt" count="0"/>
|
|
|
|
|
|
|
|
|
9503 |
<line num="387" type="stmt" count="0"/>
|
9504 |
<line num="388" type="stmt" count="0"/>
|
9505 |
<line num="389" type="stmt" count="0"/>
|
|
|
9506 |
<line num="391" type="stmt" count="0"/>
|
9507 |
<line num="392" type="stmt" count="0"/>
|
9508 |
<line num="393" type="stmt" count="0"/>
|
9509 |
-
<line num="
|
9510 |
-
<line num="
|
9511 |
-
<line num="
|
9512 |
-
<line num="
|
9513 |
-
<line num="
|
9514 |
-
<line num="
|
9515 |
-
<line num="
|
9516 |
-
<line num="
|
9517 |
-
<line num="414" type="stmt" count="0"/>
|
9518 |
-
<line num="415" type="stmt" count="0"/>
|
9519 |
<line num="417" type="stmt" count="0"/>
|
9520 |
-
<line num="
|
9521 |
-
<line num="419" type="stmt" count="0"/>
|
9522 |
<line num="421" type="stmt" count="0"/>
|
9523 |
<line num="422" type="stmt" count="0"/>
|
9524 |
-
<line num="423" type="stmt" count="0"/>
|
9525 |
-
<line num="424" type="stmt" count="0"/>
|
9526 |
-
<line num="426" type="stmt" count="0"/>
|
9527 |
-
<line num="427" type="stmt" count="0"/>
|
9528 |
-
<line num="428" type="stmt" count="0"/>
|
9529 |
-
<line num="429" type="stmt" count="0"/>
|
9530 |
<line num="431" type="stmt" count="0"/>
|
9531 |
-
<line num="432" type="stmt" count="0"/>
|
9532 |
-
<line num="433" type="stmt" count="0"/>
|
9533 |
<line num="434" type="stmt" count="0"/>
|
|
|
9534 |
<line num="436" type="stmt" count="0"/>
|
9535 |
<line num="437" type="stmt" count="0"/>
|
9536 |
<line num="438" type="stmt" count="0"/>
|
9537 |
<line num="439" type="stmt" count="0"/>
|
9538 |
-
<line num="
|
9539 |
-
<line num="
|
9540 |
-
<line num="
|
9541 |
-
<line num="446" type="stmt" count="0"/>
|
9542 |
-
<line num="448" type="stmt" count="0"/>
|
9543 |
-
<line num="449" type="stmt" count="0"/>
|
9544 |
-
<line num="450" type="stmt" count="0"/>
|
9545 |
-
<line num="451" type="stmt" count="0"/>
|
9546 |
-
<line num="452" type="stmt" count="0"/>
|
9547 |
-
<line num="453" type="stmt" count="0"/>
|
9548 |
-
<line num="457" type="stmt" count="0"/>
|
9549 |
-
<line num="458" type="stmt" count="0"/>
|
9550 |
<line num="459" type="stmt" count="0"/>
|
9551 |
<line num="460" type="stmt" count="0"/>
|
|
|
|
|
9552 |
<line num="464" type="stmt" count="0"/>
|
9553 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9554 |
<line num="489" type="stmt" count="0"/>
|
9555 |
<line num="490" type="stmt" count="0"/>
|
9556 |
-
<line num="
|
9557 |
<line num="493" type="stmt" count="0"/>
|
|
|
|
|
9558 |
<line num="496" type="stmt" count="0"/>
|
9559 |
-
<line num="
|
9560 |
-
<line num="499" type="stmt" count="0"/>
|
9561 |
-
<line num="500" type="stmt" count="0"/>
|
9562 |
<line num="501" type="stmt" count="0"/>
|
9563 |
-
<line num="
|
|
|
9564 |
<line num="505" type="stmt" count="0"/>
|
9565 |
<line num="506" type="stmt" count="0"/>
|
9566 |
<line num="507" type="stmt" count="0"/>
|
|
|
9567 |
<line num="509" type="stmt" count="0"/>
|
9568 |
-
<line num="
|
9569 |
-
<line num="513" type="stmt" count="0"/>
|
9570 |
<line num="514" type="stmt" count="0"/>
|
|
|
9571 |
<line num="516" type="stmt" count="0"/>
|
9572 |
<line num="517" type="stmt" count="0"/>
|
9573 |
-
<line num="
|
9574 |
-
<line num="
|
9575 |
-
<line num="533" type="stmt" count="0"/>
|
9576 |
-
<line num="534" type="stmt" count="0"/>
|
9577 |
-
<line num="535" type="stmt" count="0"/>
|
9578 |
-
<line num="536" type="stmt" count="0"/>
|
9579 |
-
<line num="538" type="stmt" count="0"/>
|
9580 |
-
<line num="539" type="stmt" count="0"/>
|
9581 |
-
<line num="540" type="stmt" count="0"/>
|
9582 |
-
<line num="541" type="stmt" count="0"/>
|
9583 |
-
<line num="543" type="stmt" count="0"/>
|
9584 |
<line num="546" type="stmt" count="0"/>
|
9585 |
<line num="547" type="stmt" count="0"/>
|
9586 |
-
<line num="548" type="stmt" count="0"/>
|
9587 |
<line num="549" type="stmt" count="0"/>
|
9588 |
-
<line num="
|
9589 |
-
<line num="
|
9590 |
<line num="555" type="stmt" count="0"/>
|
9591 |
<line num="556" type="stmt" count="0"/>
|
9592 |
<line num="557" type="stmt" count="0"/>
|
9593 |
<line num="558" type="stmt" count="0"/>
|
9594 |
-
<line num="559" type="stmt" count="0"/>
|
9595 |
<line num="561" type="stmt" count="0"/>
|
9596 |
-
<line num="
|
9597 |
-
<line num="
|
9598 |
-
<line num="
|
9599 |
-
<line num="
|
9600 |
-
<line num="
|
9601 |
-
<line num="
|
9602 |
-
<line num="
|
9603 |
-
<line num="
|
9604 |
-
<line num="
|
|
|
9605 |
<line num="588" type="stmt" count="0"/>
|
9606 |
-
<line num="589" type="stmt" count="0"/>
|
9607 |
<line num="590" type="stmt" count="0"/>
|
|
|
9608 |
<line num="592" type="stmt" count="0"/>
|
9609 |
<line num="593" type="stmt" count="0"/>
|
9610 |
-
<line num="594" type="stmt" count="0"/>
|
9611 |
<line num="595" type="stmt" count="0"/>
|
9612 |
<line num="596" type="stmt" count="0"/>
|
9613 |
<line num="597" type="stmt" count="0"/>
|
9614 |
-
<line num="
|
9615 |
<line num="600" type="stmt" count="0"/>
|
9616 |
-
<line num="
|
9617 |
-
<line num="
|
|
|
|
|
9618 |
<line num="609" type="stmt" count="0"/>
|
9619 |
-
<line num="610" type="stmt" count="0"/>
|
9620 |
<line num="611" type="stmt" count="0"/>
|
9621 |
<line num="612" type="stmt" count="0"/>
|
9622 |
<line num="613" type="stmt" count="0"/>
|
9623 |
<line num="614" type="stmt" count="0"/>
|
9624 |
<line num="615" type="stmt" count="0"/>
|
9625 |
-
<line num="
|
9626 |
-
<line num="
|
9627 |
-
<line num="
|
9628 |
-
<line num="631" type="stmt" count="0"/>
|
9629 |
-
<line num="634" type="stmt" count="0"/>
|
9630 |
<line num="635" type="stmt" count="0"/>
|
9631 |
<line num="636" type="stmt" count="0"/>
|
9632 |
<line num="637" type="stmt" count="0"/>
|
9633 |
<line num="638" type="stmt" count="0"/>
|
9634 |
<line num="639" type="stmt" count="0"/>
|
9635 |
-
<line num="
|
9636 |
-
<line num="
|
|
|
|
|
|
|
|
|
9637 |
<line num="649" type="stmt" count="0"/>
|
|
|
|
|
9638 |
<line num="652" type="stmt" count="0"/>
|
|
|
9639 |
<line num="654" type="stmt" count="0"/>
|
9640 |
-
<line num="
|
9641 |
-
<line num="
|
9642 |
-
<line num="
|
9643 |
-
<line num="
|
9644 |
-
<line num="663" type="stmt" count="0"/>
|
9645 |
-
<line num="664" type="stmt" count="0"/>
|
9646 |
<line num="666" type="stmt" count="0"/>
|
9647 |
<line num="667" type="stmt" count="0"/>
|
9648 |
<line num="668" type="stmt" count="0"/>
|
|
|
9649 |
<line num="670" type="stmt" count="0"/>
|
9650 |
<line num="671" type="stmt" count="0"/>
|
9651 |
<line num="672" type="stmt" count="0"/>
|
9652 |
<line num="674" type="stmt" count="0"/>
|
9653 |
-
<line num="
|
9654 |
-
<line num="
|
9655 |
-
<line num="678" type="stmt" count="0"/>
|
9656 |
-
<line num="679" type="stmt" count="0"/>
|
9657 |
-
<line num="680" type="stmt" count="0"/>
|
9658 |
-
<line num="682" type="stmt" count="0"/>
|
9659 |
-
<line num="683" type="stmt" count="0"/>
|
9660 |
-
<line num="684" type="stmt" count="0"/>
|
9661 |
-
<line num="685" type="stmt" count="0"/>
|
9662 |
-
<line num="687" type="stmt" count="0"/>
|
9663 |
<line num="688" type="stmt" count="0"/>
|
9664 |
-
<line num="690" type="stmt" count="0"/>
|
9665 |
<line num="691" type="stmt" count="0"/>
|
9666 |
<line num="692" type="stmt" count="0"/>
|
9667 |
<line num="693" type="stmt" count="0"/>
|
|
|
9668 |
<line num="695" type="stmt" count="0"/>
|
9669 |
-
<line num="
|
9670 |
-
<line num="
|
9671 |
-
<line num="
|
9672 |
-
<line num="
|
9673 |
-
<line num="
|
|
|
|
|
9674 |
<line num="716" type="stmt" count="0"/>
|
9675 |
<line num="717" type="stmt" count="0"/>
|
|
|
9676 |
<line num="720" type="stmt" count="0"/>
|
9677 |
<line num="721" type="stmt" count="0"/>
|
9678 |
<line num="723" type="stmt" count="0"/>
|
|
|
9679 |
<line num="725" type="stmt" count="0"/>
|
9680 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9681 |
<line num="741" type="stmt" count="0"/>
|
9682 |
<line num="742" type="stmt" count="0"/>
|
9683 |
-
<line num="
|
9684 |
-
<line num="
|
9685 |
<line num="747" type="stmt" count="0"/>
|
|
|
9686 |
<line num="749" type="stmt" count="0"/>
|
9687 |
<line num="750" type="stmt" count="0"/>
|
9688 |
<line num="752" type="stmt" count="0"/>
|
9689 |
-
<line num="
|
9690 |
<line num="755" type="stmt" count="0"/>
|
9691 |
<line num="756" type="stmt" count="0"/>
|
9692 |
-
<line num="
|
9693 |
-
<line num="
|
9694 |
-
<line num="762" type="stmt" count="0"/>
|
9695 |
-
<line num="763" type="stmt" count="0"/>
|
9696 |
-
<line num="764" type="stmt" count="0"/>
|
9697 |
-
<line num="765" type="stmt" count="0"/>
|
9698 |
-
<line num="767" type="stmt" count="0"/>
|
9699 |
-
<line num="768" type="stmt" count="0"/>
|
9700 |
-
<line num="770" type="stmt" count="0"/>
|
9701 |
-
<line num="771" type="stmt" count="0"/>
|
9702 |
<line num="773" type="stmt" count="0"/>
|
9703 |
<line num="774" type="stmt" count="0"/>
|
9704 |
-
<line num="776" type="stmt" count="0"/>
|
9705 |
<line num="777" type="stmt" count="0"/>
|
9706 |
-
<line num="
|
9707 |
-
<line num="
|
|
|
|
|
|
|
9708 |
<line num="799" type="stmt" count="0"/>
|
9709 |
<line num="800" type="stmt" count="0"/>
|
9710 |
-
<line num="801" type="stmt" count="0"/>
|
9711 |
-
<line num="802" type="stmt" count="0"/>
|
9712 |
<line num="803" type="stmt" count="0"/>
|
9713 |
<line num="804" type="stmt" count="0"/>
|
9714 |
-
<line num="
|
9715 |
<line num="807" type="stmt" count="0"/>
|
9716 |
-
<line num="808" type="stmt" count="0"/>
|
9717 |
<line num="809" type="stmt" count="0"/>
|
9718 |
-
<line num="
|
|
|
9719 |
<line num="813" type="stmt" count="0"/>
|
9720 |
-
<line num="814" type="stmt" count="0"/>
|
9721 |
-
<line num="815" type="stmt" count="0"/>
|
9722 |
<line num="817" type="stmt" count="0"/>
|
9723 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9724 |
<line num="828" type="stmt" count="0"/>
|
9725 |
-
<line num="
|
|
|
9726 |
<line num="833" type="stmt" count="0"/>
|
9727 |
<line num="834" type="stmt" count="0"/>
|
9728 |
-
<line num="835" type="stmt" count="0"/>
|
9729 |
-
<line num="838" type="stmt" count="0"/>
|
9730 |
-
<line num="839" type="stmt" count="0"/>
|
9731 |
-
<line num="840" type="stmt" count="0"/>
|
9732 |
-
<line num="841" type="stmt" count="0"/>
|
9733 |
-
<line num="842" type="stmt" count="0"/>
|
9734 |
-
<line num="843" type="stmt" count="0"/>
|
9735 |
-
<line num="844" type="stmt" count="0"/>
|
9736 |
-
<line num="845" type="stmt" count="0"/>
|
9737 |
-
<line num="847" type="stmt" count="0"/>
|
9738 |
-
<line num="848" type="stmt" count="0"/>
|
9739 |
<line num="850" type="stmt" count="0"/>
|
9740 |
-
<line num="851" type="stmt" count="0"/>
|
9741 |
<line num="852" type="stmt" count="0"/>
|
9742 |
-
<line num="
|
9743 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
9744 |
<line num="864" type="stmt" count="0"/>
|
|
|
9745 |
<line num="866" type="stmt" count="0"/>
|
9746 |
-
<line num="867" type="stmt" count="0"/>
|
9747 |
<line num="868" type="stmt" count="0"/>
|
9748 |
-
<line num="869" type="stmt" count="0"/>
|
9749 |
<line num="870" type="stmt" count="0"/>
|
9750 |
-
<line num="
|
9751 |
-
<line num="
|
9752 |
-
<line num="
|
9753 |
-
<line num="
|
9754 |
-
<line num="884" type="stmt" count="0"/>
|
9755 |
<line num="885" type="stmt" count="0"/>
|
9756 |
<line num="886" type="stmt" count="0"/>
|
9757 |
-
<line num="
|
9758 |
-
<line num="
|
|
|
|
|
|
|
9759 |
<line num="897" type="stmt" count="0"/>
|
9760 |
<line num="898" type="stmt" count="0"/>
|
9761 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
9762 |
<line num="908" type="stmt" count="0"/>
|
9763 |
-
<line num="
|
9764 |
-
<line num="
|
9765 |
-
<line num="
|
|
|
|
|
9766 |
<line num="924" type="stmt" count="0"/>
|
|
|
9767 |
<line num="926" type="stmt" count="0"/>
|
9768 |
<line num="927" type="stmt" count="0"/>
|
9769 |
-
<line num="
|
9770 |
-
<line num="929" type="stmt" count="0"/>
|
9771 |
-
<line num="930" type="stmt" count="0"/>
|
9772 |
-
<line num="933" type="stmt" count="0"/>
|
9773 |
-
<line num="934" type="stmt" count="0"/>
|
9774 |
-
<line num="935" type="stmt" count="0"/>
|
9775 |
<line num="938" type="stmt" count="0"/>
|
9776 |
<line num="939" type="stmt" count="0"/>
|
9777 |
<line num="940" type="stmt" count="0"/>
|
9778 |
-
<line num="
|
9779 |
-
<line num="
|
9780 |
-
<line num="
|
9781 |
-
<line num="
|
9782 |
-
<line num="
|
9783 |
-
<line num="
|
9784 |
-
<line num="
|
9785 |
-
<line num="
|
9786 |
-
<line num="
|
9787 |
-
<line num="
|
9788 |
-
<line num="
|
|
|
|
|
9789 |
<line num="969" type="stmt" count="0"/>
|
9790 |
<line num="970" type="stmt" count="0"/>
|
9791 |
-
<line num="
|
9792 |
-
<line num="
|
9793 |
-
<line num="
|
9794 |
-
<line num="
|
9795 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9796 |
</file>
|
9797 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-remote-settings.php">
|
9798 |
<class name="Boldgrid_Backup_Admin_Remote_Settings" namespace="global" fullPackage="Boldgrid.Backup.Admin.Remote">
|
@@ -9830,207 +9863,6 @@
|
|
9830 |
<line num="188" type="stmt" count="2"/>
|
9831 |
<metrics loc="189" ncloc="63" classes="1" methods="9" coveredmethods="9" conditionals="0" coveredconditionals="0" statements="21" coveredstatements="21" elements="30" coveredelements="30"/>
|
9832 |
</file>
|
9833 |
-
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/remote/class-boldgrid-backup-admin-sftp.php">
|
9834 |
-
<class name="Boldgrid_Backup_Admin_Sftp" namespace="global" fullPackage="Boldgrid.Backup.Admin">
|
9835 |
-
<metrics complexity="69" methods="17" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="168" coveredstatements="0" elements="185" coveredelements="0"/>
|
9836 |
-
</class>
|
9837 |
-
<line num="138" type="method" name="__construct" visibility="public" complexity="1" crap="2" count="0"/>
|
9838 |
-
<line num="139" type="stmt" count="0"/>
|
9839 |
-
<line num="141" type="stmt" count="0"/>
|