Fixed incorrect error message
authorJamie Cameron <jcameron@webmin.com>
Tue, 22 May 2007 23:39:23 +0000 (23:39 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 22 May 2007 23:39:23 +0000 (23:39 +0000)
backup-config/backup-config-lib.pl
backup-config/lang/en

index 00f32b8..438118c 100644 (file)
@@ -156,10 +156,12 @@ sub parse_backup_destination
 local %in = %{$_[1]};
 local $mode = $in{"$_[0]_mode"};
 if ($mode == 0) {
+       # Local file
        $in{"$_[0]_file"} =~ /^\/\S/ || &error($text{'backup_edest'});
        return $in{"$_[0]_file"};
        }
 elsif ($mode == 1) {
+       # FTP server
        gethostbyname($in{"$_[0]_server"}) || &error($text{'backup_eserver1'});
        $in{"$_[0]_path"} =~ /^\/\S/ || &error($text{'backup_epath'});
        $in{"$_[0]_user"} =~ /^[^:]*$/ || &error($text{'backup_euser'});
@@ -168,8 +170,9 @@ elsif ($mode == 1) {
               $in{"$_[0]_server"}.$in{"$_[0]_path"};
        }
 elsif ($mode == 2) {
+       # SSH server
        gethostbyname($in{"$_[0]_sserver"}) || &error($text{'backup_eserver2'});
-       $in{"$_[0]_spath"} =~ /^\/\S/ || &error($text{'backup_epath'});
+       $in{"$_[0]_spath"} =~ /^\/\S/ || &error($text{'backup_epath2'});
        $in{"$_[0]_suser"} =~ /^[^:]*$/ || &error($text{'backup_euser'});
        $in{"$_[0]_spass"} =~ /^[^\@]*$/ || &error($text{'backup_epass'});
        return "ssh://".$in{"$_[0]_suser"}.":".$in{"$_[0]_spass"}."\@".
index cba7c1e..c7bc40c 100644 (file)
@@ -65,6 +65,7 @@ backup_edest=Missing or invalid absolute local file
 backup_eserver1=Missing or invalid FTP server
 backup_eserver2=Missing or invalid SSH server
 backup_epath=Missing or invalid absolute path on FTP server
+backup_epath2=Missing or invalid absolute path on SSH server
 backup_euser=Invalid characters in FTP server login
 backup_epass=Invalid characters in FTP server password
 backup_emods=No modules selected