From 5eefedd1fae821a3981218ceaccb7f5e50f823f9 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 7 Oct 2007 22:14:00 +0200 Subject: [PATCH] Packages::CGI: Remove support for msgs and notes Unused code. --- lib/Packages/CGI.pm | 14 ++------------ lib/Packages/DoShow.pm | 2 +- static/packages.css.sed.in | 10 ---------- templates/html/messages.tmpl | 15 --------------- 4 files changed, 3 insertions(+), 38 deletions(-) diff --git a/lib/Packages/CGI.pm b/lib/Packages/CGI.pm index b15e9ed..c29e56c 100644 --- a/lib/Packages/CGI.pm +++ b/lib/Packages/CGI.pm @@ -26,11 +26,11 @@ sub get_mime { return $mime_types{$_[0]} || $_[1] || 'text/html'; } -our (@fatal_errors, @errors, @debug, @msgs, @hints, @notes); +our (@fatal_errors, @errors, @debug, @hints); our $http_code; sub reset { - @fatal_errors = @errors = @debug = @msgs = @hints = @notes = (); + @fatal_errors = @errors = @debug = @hints = (); $http_code = 200; } @@ -48,27 +48,17 @@ sub debug { my $lvl = $_[1] || 0; push(@debug, $_[0]) if $debug > $lvl; } -sub msg { - push @msgs, $_[0]; -} -sub note { - push @notes, [ @_ ]; -} sub get_errors { (@fatal_errors, @errors) } sub get_debug { return unless $debug && @debug; return @debug; } -sub get_msgs { @msgs }; sub get_hints { @hints }; -sub get_notes { @notes }; sub get_all_messages { return { errors => [ @fatal_errors, @errors ], debugs => $debug ? \@debug : [], - msgs => \@msgs, hints => \@hints, - notes => \@notes, }; } diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index 30158c5..2e33692 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -14,7 +14,7 @@ use Deb::Versions; use Packages::Config qw( $DBDIR @SUITES @ARCHIVES @SECTIONS @ARCHITECTURES %FTP_SITES @DDTP_LANGUAGES); use Packages::I18N::Locale; -use Packages::CGI qw( :DEFAULT make_url make_search_url note ); +use Packages::CGI qw( :DEFAULT make_url make_search_url ); use Packages::DB; use Packages::Search qw( :all ); use Packages::Page (); diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in index 9e09dd8..7a4d9d3 100644 --- a/static/packages.css.sed.in +++ b/static/packages.css.sed.in @@ -137,16 +137,6 @@ h1 { margin: 0; clear: both; } -.pnotes { - margin: .2em; - padding: .5em; - border: solid thin black; - background-color: #bdf; - clear: both; -} -.pnotes h2 { - color: red; -} .pconstantnag { max-width: 60em; border: dotted thin red; diff --git a/templates/html/messages.tmpl b/templates/html/messages.tmpl index 7c9c611..3faa76d 100644 --- a/templates/html/messages.tmpl +++ b/templates/html/messages.tmpl @@ -14,18 +14,3 @@

[% hint | html %]

[% '' IF loop.last -%] [% END -%] -[%- FOREACH msg IN msgs %] -[%- '
' IF loop.first %] -

[% msg | html %]

-[% '
' IF loop.last -%] -[% END -%] -[%- FOREACH note IN notes %] -[%- '
' IF loop.first %] -[%- IF note.1 %] -

[% note.0 | html %]

-

[% note.1 | html %]

-[% ELSE %] -

[% note.0 | html %]

-[% END -%] -[% '
' IF loop.last -%] -[% END -%] -- 2.39.2