From aa7b70a36bf580eb1e9e73eb0a058c89e97bb313 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Sun, 9 Oct 2016 11:53:09 +0200 Subject: [PATCH] Fix remaining _SPC_ in username. Thanks to roshanroche for the report. --- SquidAnalyzer.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index d3f1246..96d5a83 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -3994,7 +3994,6 @@ sub _print_network_stat my $outnet = new IO::File; $outnet->open(">$outdir/networks/$net/$net.html") || return; # Print the HTML header - #my $cal = 'SA_CALENDAR_SA'; my $cal = ''; $self->_print_header(\$outnet, $self->{menu2}, $cal, $sortpos); print $outnet $self->_print_title("$Translate{'Network_title'} $show -", $stat_date, $week); @@ -4296,10 +4295,11 @@ sub _print_user_stat my $outusr = new IO::File; $outusr->open(">$outdir/users/$upath/$upath.html") || return; # Print the HTML header - #my $cal = 'SA_CALENDAR_SA'; my $cal = ''; $self->_print_header(\$outusr, $self->{menu2}, $cal, $sortpos); - print $outusr $self->_print_title("$Translate{'User_title'} $usr -", $stat_date, $week); + my $usr_lbl = $usr; + $usr_lbl =~ s/_SPC_/ /g; + print $outusr $self->_print_title("$Translate{'User_title'} $usr_lbl -", $stat_date, $week); my @hits = (); my @bytes = (); @@ -5055,7 +5055,9 @@ sub _print_top_url_stat } elsif ($tpe eq 'Duration') { $value = &parse_duration(int($value/1000)); } - print $out "$user$value\n"; + my $usr_lbl = $user; + $usr_lbl =~ s/_SPC_/ /g; + print $out "$usr_lbl$value\n"; $k++; last if ($k > $self->{TopUrlUser}); } @@ -5680,7 +5682,9 @@ $domain2_bytes } elsif ($tpe eq 'Duration') { $value = &parse_duration(int($value/1000)); } - print $out "$user$value\n"; + my $usr_lbl = $user; + $usr_lbl =~ s/_SPC_/ /g; + print $out "$usr_lbl$value\n"; $k++; last if ($k > $self->{TopUrlUser}); }