Jamie Cameron
2011-08-16 10:23:45 -07:00
parent 1f448a8ef4
commit 421ee7be68
2 changed files with 6 additions and 5 deletions

View File

@@ -125,16 +125,17 @@ user, pass, host, page, port (optional)
=cut
sub parse_backup_url
{
if ($_[0] =~ /^ftp:\/\/([^:]*):([^\@]*)\@([^\/:]+)(:(\d+))?(\/.*)$/) {
if ($_[0] && $_[0] =~ /^ftp:\/\/([^:]*):([^\@]*)\@([^\/:]+)(:(\d+))?(\/.*)$/) {
return (1, $1, $2, $3, $6, $5);
}
elsif ($_[0] =~ /^ssh:\/\/([^:]*):([^\@]*)\@([^\/:]+)(:(\d+))?(\/.*)$/) {
elsif ($_[0] &&
$_[0] =~ /^ssh:\/\/([^:]*):([^\@]*)\@([^\/:]+)(:(\d+))?(\/.*)$/) {
return (2, $1, $2, $3, $6, $5);
}
elsif ($_[0] =~ /^upload:(.*)$/) {
elsif ($_[0] && $_[0] =~ /^upload:(.*)$/) {
return (3, undef, undef, undef, $1);
}
elsif ($_[0] =~ /^download:$/) {
elsif ($_[0] && $_[0] =~ /^download:$/) {
return (4, undef, undef, undef, undef);
}
else {

View File

@@ -59,7 +59,7 @@ print &ui_tabs_start_tab("tab", "backup");
print &ui_form_start("backup.cgi/backup.tgz", "post");
print &ui_table_start($text{'index_header'}, undef, 2);
my @dmods = split(/\s+/, $config{'mods'});
my @dmods = split(/\s+/, $config{'mods'} || "");
print &ui_table_row($text{'edit_mods'},
&ui_select("mods", \@dmods,
[ map { [ $_->{'dir'}, $_->{'desc'} ] } @mods ],