projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Various tweaks to recent changes, including additional patches
[BackupPC.git]
/
lib
/
BackupPC
/
CGI
/
View.pm
diff --git
a/lib/BackupPC/CGI/View.pm
b/lib/BackupPC/CGI/View.pm
index
2a4239b
..
4f3070a
100644
(file)
--- a/
lib/BackupPC/CGI/View.pm
+++ b/
lib/BackupPC/CGI/View.pm
@@
-72,6
+72,11
@@
sub action
} elsif ( $type eq "RestoreErr" ) {
$file = "$TopDir/pc/$host/RestoreLOG$ext";
$comment = $Lang->{Extracting_only_Errors};
} elsif ( $type eq "RestoreErr" ) {
$file = "$TopDir/pc/$host/RestoreLOG$ext";
$comment = $Lang->{Extracting_only_Errors};
+ } elsif ( $type eq "ArchiveLOG" ) {
+ $file = "$TopDir/pc/$host/ArchiveLOG$ext";
+ } elsif ( $type eq "ArchiveErr" ) {
+ $file = "$TopDir/pc/$host/ArchiveLOG$ext";
+ $comment = $Lang->{Extracting_only_Errors};
} elsif ( $host ne "" && $type eq "config" ) {
$file = "$TopDir/pc/$host/config.pl";
$file = "$TopDir/conf/$host.pl"
} elsif ( $host ne "" && $type eq "config" ) {
$file = "$TopDir/pc/$host/config.pl";
$file = "$TopDir/conf/$host.pl"
@@
-81,9
+86,10
@@
sub action
$file = "$BinDir/../doc/BackupPC.html";
if ( open(LOG, $file) ) {
binmode(LOG);
$file = "$BinDir/../doc/BackupPC.html";
if ( open(LOG, $file) ) {
binmode(LOG);
-
Header($Lang->{BackupPC__Documentation})
;
-
print
while ( <LOG> );
+
my $content
;
+
$content .= $_
while ( <LOG> );
close(LOG);
close(LOG);
+ Header($Lang->{BackupPC__Documentation}, $content);
Trailer();
} else {
ErrorExit(eval("qq{$Lang->{Unable_to_open__file__configuration_problem}}"));
Trailer();
} else {
ErrorExit(eval("qq{$Lang->{Unable_to_open__file__configuration_problem}}"));
@@
-106,21
+112,21
@@
sub action
$file .= ".z";
$compress = 1;
}
$file .= ".z";
$compress = 1;
}
-
Header(eval("qq{$Lang->{Backup_PC__Log_File__file}}") )
;
-
print( eval ("qq{$Lang->{Log_File__file__comment}}")
);
+
my $content
;
+
$content .= eval ("qq{$Lang->{Log_File__file__comment}}"
);
if ( defined($fh = BackupPC::FileZIO->open($file, 0, $compress)) ) {
my $mtimeStr = $bpc->timeStamp((stat($file))[9], 1);
if ( defined($fh = BackupPC::FileZIO->open($file, 0, $compress)) ) {
my $mtimeStr = $bpc->timeStamp((stat($file))[9], 1);
-
print
( eval ("qq{$Lang->{Contents_of_log_file}}"));
+
$content .=
( eval ("qq{$Lang->{Contents_of_log_file}}"));
-
print
"<pre>";
+
$content .=
"<pre>";
if ( $type eq "XferErr" || $type eq "XferErrbad"
|| $type eq "RestoreErr" ) {
my $skipped;
while ( 1 ) {
$_ = $fh->readLine();
if ( $_ eq "" ) {
if ( $type eq "XferErr" || $type eq "XferErrbad"
|| $type eq "RestoreErr" ) {
my $skipped;
while ( 1 ) {
$_ = $fh->readLine();
if ( $_ eq "" ) {
-
print
(eval ("qq{$Lang->{skipped__skipped_lines}}"))
+
$content .=
(eval ("qq{$Lang->{skipped__skipped_lines}}"))
if ( $skipped );
last;
}
if ( $skipped );
last;
}
@@
-144,10
+150,10
@@
sub action
$skipped++;
next;
}
$skipped++;
next;
}
-
print
(eval("qq{$Lang->{skipped__skipped_lines}}"))
+
$content .=
(eval("qq{$Lang->{skipped__skipped_lines}}"))
if ( $skipped );
$skipped = 0;
if ( $skipped );
$skipped = 0;
-
print
${EscHTML($_)};
+
$content .=
${EscHTML($_)};
}
} elsif ( $linkHosts ) {
while ( 1 ) {
}
} elsif ( $linkHosts ) {
while ( 1 ) {
@@
-156,7
+162,7
@@
sub action
my $s = ${EscHTML($_)};
$s =~ s/\b([\w-]+)\b/defined($Hosts->{$1})
? ${HostLink($1)} : $1/eg;
my $s = ${EscHTML($_)};
$s =~ s/\b([\w-]+)\b/defined($Hosts->{$1})
? ${HostLink($1)} : $1/eg;
-
print
$s;
+
$content .=
$s;
}
} elsif ( $type eq "config" ) {
while ( 1 ) {
}
} elsif ( $type eq "config" ) {
while ( 1 ) {
@@
-167,22
+173,23
@@
sub action
s/(SmbShareUserName.*=.*['"]).*(['"])/$1$2/ig;
s/(RsyncdPasswd.*=.*['"]).*(['"])/$1$2/ig;
s/(ServerMesgSecret.*=.*['"]).*(['"])/$1$2/ig;
s/(SmbShareUserName.*=.*['"]).*(['"])/$1$2/ig;
s/(RsyncdPasswd.*=.*['"]).*(['"])/$1$2/ig;
s/(ServerMesgSecret.*=.*['"]).*(['"])/$1$2/ig;
-
print
${EscHTML($_)};
+
$content .=
${EscHTML($_)};
}
} else {
while ( 1 ) {
$_ = $fh->readLine();
last if ( $_ eq "" );
}
} else {
while ( 1 ) {
$_ = $fh->readLine();
last if ( $_ eq "" );
-
print
${EscHTML($_)};
+
$content .=
${EscHTML($_)};
}
}
$fh->close();
} else {
}
}
$fh->close();
} else {
-
printf
( eval("qq{$Lang->{_pre___Can_t_open_log_file__file}}"));
+
$content .=
( eval("qq{$Lang->{_pre___Can_t_open_log_file__file}}"));
}
}
-
print
<<EOF;
+
$content .=
<<EOF;
</pre>
EOF
</pre>
EOF
+ Header(eval("qq{$Lang->{Backup_PC__Log_File__file}}"), $content);
Trailer();
}
Trailer();
}