Skip to content

Commit 0fb9772

Browse files
committed
[fix] correct default format detection
1 parent e69a5b3 commit 0fb9772

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

server/lib/classes/backup.inc.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ protected static function restoreFileOwnership($web_document_root, $web_user)
110110

111111
/**
112112
* Returns default backup format used in previous versions of ISPConfig
113-
* @param string $backup_mode
114-
* @param string $backup_type
113+
* @param string $backup_mode can be 'userzip' or 'rootgz'
114+
* @param string $backup_type can be 'web' or 'mysql'
115115
* @return string
116116
* @author Ramil Valitov <ramilvalitov@gmail.com>
117117
*/
@@ -1264,10 +1264,7 @@ protected static function make_web_backup($web_domain, $backup_job)
12641264
$backup_format_web = 'default';
12651265
}
12661266
if ($backup_format_web == 'default') {
1267-
if ($backup_mode == 'userzip')
1268-
$backup_format_web = 'zip';
1269-
else
1270-
$backup_format_web = 'gzip';
1267+
$backup_format_web = self::getDefaultBackupFormat($backup_mode, 'web');
12711268
}
12721269
$password = ($web_domain['backup_encrypt'] == 'y') ? trim($web_domain['backup_password']) : '';
12731270
$backup_extension_web = self::getBackupWebExtension($backup_format_web);

0 commit comments

Comments
 (0)