From 66d862e577fdd9622bbf1d8c6ef1cf092348436c Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Tue, 29 Nov 2005 22:19:31 +0000 Subject: [PATCH] - Change title to something sensible - Update FAQ - Remove more dead code related to new/updated view --- en/cgi/ports.cgi | 69 +++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 51 deletions(-) diff --git a/en/cgi/ports.cgi b/en/cgi/ports.cgi index 415d747638..82494eae07 100755 --- a/en/cgi/ports.cgi +++ b/en/cgi/ports.cgi @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: www/en/cgi/ports.cgi,v 1.87 2005/11/29 22:02:43 pav Exp $ +# $FreeBSD: www/en/cgi/ports.cgi,v 1.88 2005/11/29 22:09:53 pav Exp $ # # ports.cgi - search engine for FreeBSD ports # o search for a port by name or description @@ -303,7 +303,7 @@ sub readcoll { # basic function for HTML output sub out { - local($line, $old) = @_; + local($line) = @_; local($version, $path, $local, $comment, $descfile, $email, $sections, $bdepends, $rdepends, @rest) = split(/\|/, $line); @@ -339,18 +339,6 @@ sub out { print qq{
$version\n}; print qq{
$comment
\n}; - if ($old) { - local($l) = $descfile; - $l =~ s%^$remotePrefixFtp%$remotePrefixCvs%o; - $l =~ s%/([^/]+)$%/Attic/$1%; - - print qq{Was Maintained by: $email
} . - qq{Removed why
}; - - } else { local($l) = $path; $l =~ s%^$remotePrefixFtp%$remotePrefixCvs%o; #$l .= '/Makefile'; @@ -399,9 +387,6 @@ print qq[Changes :

]; -}; - - }; # search and output @@ -422,17 +407,17 @@ sub search_ports { #warn "$stype:$query: $name $text\n"; if ($stype eq "name" && $name =~ /$query/o) { - &out($today{$key}, 0); + &out($today{$key}); } elsif ($stype eq "text" && $text =~ /$query/oi) { - &out($today{$key}, 0); + &out($today{$key}); } elsif ($stype eq "all" && ($text =~ /$query/oi || $name =~ /$query/io)) { - &out($today{$key}, 0); + &out($today{$key}); } elsif ($stype eq 'maintainer' && $a[5] =~ /$query/io) { - &out($today{$key}, 0); + &out($today{$key}); } elsif ($stype eq 'requires' && ($a[7] =~ /$query/io || $a[8] =~ /$query/io)) { - &out($today{$key}, 0); + &out($today{$key}); } } @@ -442,11 +427,11 @@ sub search_ports { sub forms { print qq{ -FreeBSD Ports Changes +FreeBSD Ports Search -

FreeBSD Ports Changes $daemonGif

+

FreeBSD Ports Search $daemonGif

FreeBSD Ports [short description followed ...] @@ -507,7 +492,7 @@ sub footer { Powered by FreeBSD © 1996-2005 by Wolfram Schneider. All rights reserved.
}; - #print q{$FreeBSD: www/en/cgi/ports.cgi,v 1.87 2005/11/29 22:02:43 pav Exp $} . "
\n"; + #print q{$FreeBSD: www/en/cgi/ports.cgi,v 1.88 2005/11/29 22:09:53 pav Exp $} . "
\n"; print qq{Please direct questions about this service to $mailto
\n}; print qq{General questions about FreeBSD ports should be sent to } . @@ -536,26 +521,12 @@ sub check_input { return; } } - - if (!($type eq "new" || $type eq "changed" || $type eq "removed")) { - &warn("unknown type `$type', use `new', `changed', or `removed'\n"); - &exit(0); - } - - if ($time !~ /^[1-9][0-9]*\s+(month|week)\s+ago$/ && - # support diff by revision too - $time !~ /^rev[1-9]+\.[0-9]+$/ - ) - { - &warn("unknown date: `$time'\n"); - &exit(0); - } } sub faq { - print qq{\nFAQ\n + print qq{\nFreeBSD Ports Search FAQ\n -

FreeBSD Ports Changed FAQ

+

FreeBSD Ports Search FAQ

Keywords

@@ -567,14 +538,13 @@ sub faq {

Misc

-All links point to the FreeBSD-stable +Package download links point to the FreeBSD 6-STABLE version and not to the latest releases.

The script ports.cgi use the file - -FreeBSD-CVS/ports/INDEX,v -as database for most operations. INDEX,v will be updated by hand -by the portsmeister. An updated INDEX file is used if available.

+$ports_database +as database for it's operations. $ports_database is updated automatically every +two hours.

You may also search the ports manual pages.

@@ -595,8 +565,6 @@ $query_string = &env('QUERY_STRING'); $path_info = &env('PATH_INFO'); &decode_form($query_string, *form); -$type = $form{'type'}; -$time = $form{'time'}; $section = $form{'sektion'}; $query = $form{'query'}; $stype = $form{'stype'}; @@ -628,7 +596,7 @@ if ($path_info eq "/faq.html") { # allow `/ports.cgi?netscape' where 'netscape' is the query port to search # this make links to this script shorter -if (!$query && !$type && $query_string =~ /^([^=&]+)$/) { +if (!$query && $query_string =~ /^([^=&]+)$/) { $query = $1; } @@ -639,11 +607,10 @@ if (!$query && !$type && $query_string =~ /^([^=&]+)$/) { $query =~ s/^\s+//; $query =~ s/\s+$//; -if ($query_string eq "" || (!$query && !$type)) { +if ($query_string eq "" || !$query) { &footer; &footer2; &exit(0); } -#warn "type: $type time: $time section: $section stype: $stype query: $query"; &check_input; $counter = 0;