From 7ad2bb51cde41c158308417e3d0ba8a3af11360e Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Sun, 2 Jun 2013 11:05:04 +0200 Subject: [PATCH] Skip some code when --no-year-stat is enabled. --- SquidAnalyzer.pm | 12 ++++++------ doc/squidanalyzer.3 | 31 +++++++++++-------------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/SquidAnalyzer.pm b/SquidAnalyzer.pm index 0d6e3a3..2289536 100644 --- a/SquidAnalyzer.pm +++ b/SquidAnalyzer.pm @@ -1420,12 +1420,12 @@ sub _print_cache_stat $out->open(">$file") || die "ERROR: Unable to open $file. $!\n"; # Print the HTML header my $cal = $self->_get_calendar($stat_date, $type, $outdir); - $self->_print_header(\$out, $self->{menu}, $cal); - - # Print title and calendar view - print $out $self->_print_title($Translate{'Cache_title'}, $stat_date); - - if ( $self->{no_year_stat} && ($type eq 'month') ) { + if ( !$self->{no_year_stat} || ($type ne 'month') ) { + $self->_print_header(\$out, $self->{menu}, $cal); + print $out $self->_print_title($Translate{'Cache_title'}, $stat_date); + } else { + $self->_print_header(\$out, $self->{menu3}, $cal); + print $out $self->_print_title($Translate{'Cache_title'}, $stat_date); %code_stat = (); $self->_print_footer(\$out); $out->close(); diff --git a/doc/squidanalyzer.3 b/doc/squidanalyzer.3 index 0ac5c32..df16a37 100644 --- a/doc/squidanalyzer.3 +++ b/doc/squidanalyzer.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.26 (Pod::Simple 3.07) +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,8 +38,6 @@ . ds PI \(*p . ds L" `` . ds R" '' -. ds C` -. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -50,24 +48,17 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX .. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} .\} -.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -133,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "SQUIDANALYZER 1" -.TH SQUIDANALYZER 1 "2013-05-27" "perl v5.10.1" "User Contributed Perl Documentation" +.TH SQUIDANALYZER 1 "2013-05-26" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l