"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/BackupPC/CGI/LOGlist.pm" between
BackupPC-4.3.2.tar.gz and BackupPC-4.4.0.tar.gz

About: BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server’s disk (http/cgi user interface).

LOGlist.pm  (BackupPC-4.3.2):LOGlist.pm  (BackupPC-4.4.0)
skipping to change at line 30 skipping to change at line 30
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
#======================================================================== #========================================================================
# #
# Version 4.3.2, released 17 Feb 2020. # Version 4.4.0, released 20 Jun 2020.
# #
# See http://backuppc.sourceforge.net. # See http://backuppc.sourceforge.net.
# #
#======================================================================== #========================================================================
package BackupPC::CGI::LOGlist; package BackupPC::CGI::LOGlist;
use strict; use strict;
use BackupPC::CGI::Lib qw(:all); use BackupPC::CGI::Lib qw(:all);
skipping to change at line 52 skipping to change at line 52
{ {
my $Privileged = CheckPermission($In{host}); my $Privileged = CheckPermission($In{host});
if ( !$Privileged ) { if ( !$Privileged ) {
ErrorExit($Lang->{Only_privileged_users_can_view_log_files}); ErrorExit($Lang->{Only_privileged_users_can_view_log_files});
} }
my $host = $In{host}; my $host = $In{host};
my($url0, $hdr, @files, $str); my($url0, $hdr, @files, $str);
if ( $host ne "" ) { if ( $host ne "" ) {
$url0 = "&host=${EscURI($host)}"; $url0 = "&host=${EscURI($host)}";
$hdr = "for host $host"; $hdr = "for host $host";
} else { } else {
$url0 = ""; $url0 = "";
$hdr = ""; $hdr = "";
} }
foreach my $file ( $bpc->sortedPCLogFiles($host) ) { foreach my $file ( $bpc->sortedPCLogFiles($host) ) {
my $url1 = "&num=$1" if ( $file =~ /LOG\.(\d+)(\.z)?$/ ); my $url1 = "&num=$1" if ( $file =~ /LOG\.(\d+)(\.z)?$/ );
$url1 = "&num=" if ( $file =~ /LOG(\.z)?$/ ); $url1 = "&num=" if ( $file =~ /LOG(\.z)?$/ );
next if ( !-f $file ); next if ( !-f $file );
my $mtimeStr = $bpc->timeStamp((stat($file))[9], 1); my $mtimeStr = $bpc->timeStamp((stat($file))[9], 1);
my $size = (stat($file))[7]; my $size = (stat($file))[7];
(my $fStr = $file) =~ s{.*/}{}; (my $fStr = $file) =~ s{.*/}{};
$str .= <<EOF; $str .= <<EOF;
<tr><td> <a href="$MyURL?action=view&type=LOG$url0$url1"><tt>$fStr</tt></a></td> <tr><td> <a href="$MyURL?action=view&type=LOG$url0$url1"><tt>$fStr</tt></a></td>
<td align="right"> $size </td> <td align="right"> $size </td>
<td> $mtimeStr </td></tr> <td> $mtimeStr </td></tr>
EOF EOF
} }
my $content = eval("qq{$Lang->{Log_File_History__hdr}}"); my $content = eval("qq{$Lang->{Log_File_History__hdr}}");
Header($Lang->{BackupPC__Log_File_History}, Header($Lang->{BackupPC__Log_File_History}, $content, !-f "$TopDir/pc/$host/
$content, !-f "$TopDir/pc/$host/backups"); backups");
Trailer(); Trailer();
} }
sub compareLOGName sub compareLOGName
{ {
#my($a, $b) = @_; #my($a, $b) = @_;
my $na = $1 if ( $a =~ /LOG\.(\d+)/ ); my $na = $1 if ( $a =~ /LOG\.(\d+)/ );
my $nb = $1 if ( $b =~ /LOG\.(\d+)/ ); my $nb = $1 if ( $b =~ /LOG\.(\d+)/ );
 End of changes. 6 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)