X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FView.pm;h=02470684e723450c8a99629e99d12e2ff9f9f3dd;hp=335fde46450e085d018ca565edc0699e8ca5a74c;hb=fda25dc88a63ccac1c80efa2e4994bf0725ca9b7;hpb=b81d2da5e16975674f011e4833337ac0fa24e0ea diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm index 335fde4..0247068 100644 --- a/lib/BackupPC/CGI/View.pm +++ b/lib/BackupPC/CGI/View.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003 Craig Barratt +# Copyright (C) 2003-2007 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 3.0.0beta2, released 11 Nov 2006. +# Version 3.1.0, released 25 Nov 2007. # # See http://backuppc.sourceforge.net. # @@ -86,11 +86,12 @@ sub action $file = $bpc->ConfDir() . "/hosts"; $linkHosts = 1; } elsif ( $type eq "docs" ) { - $file = "$BinDir/../doc/BackupPC.html"; + $file = $bpc->InstallDir() . "/doc/BackupPC.html"; } elsif ( $host ne "" ) { if ( !defined($In{num}) ) { # get the latest LOG file $file = ($bpc->sortedPCLogFiles($host))[0]; + $file =~ s/\.z$//; } else { $file = "$TopDir/pc/$host/LOG$ext"; } @@ -173,7 +174,7 @@ sub action last if ( $s eq "" ); $s =~ s/[\n\r]+//g; $s = ${EscHTML($s)}; - $s =~ s/\b([\w-]+)\b/defined($Hosts->{$1}) + $s =~ s/\b([\w-.]+)\b/defined($Hosts->{$1}) ? ${HostLink($1)} : $1/eg; $c .= $s . "\n"; } @@ -199,7 +200,7 @@ sub action $s =~ s[(\$Conf\{.*?\})][ my $c = $1; my $s = lc($c); - $s =~ s{(\W)}{sprintf("%%%02x", ord($1) )}gxe; + $s =~ s{(\W)}{_}g; "$c" ]eg; $c .= $s . "\n";