[Debtags-commits] [svn] r1529 -
central-database/branches/alioth/webfrontend
Enrico Zini
enrico at costa.debian.org
Thu Nov 24 15:40:20 UTC 2005
Author: enrico
Date: Thu Nov 24 15:40:20 2005
New Revision: 1529
Modified:
central-database/branches/alioth/webfrontend/search.cgi
Log:
Restore sane default action for search.cgi
Modified: central-database/branches/alioth/webfrontend/search.cgi
==============================================================================
--- central-database/branches/alioth/webfrontend/search.cgi (original)
+++ central-database/branches/alioth/webfrontend/search.cgi Thu Nov 24 15:40:20 2005
@@ -43,7 +43,7 @@
# Parse input values
my (@want_tags, @unwant_tags, @ignore_tags, @sel_words);
-my $action;
+my $action = 'begin';
if (my $selwords = param('start'))
{
@@ -64,10 +64,13 @@
}
}
-# Only take input tags once, and validate them
+if ($action ne 'begin')
{
- my %seen;
- @want_tags = Engine::tags(grep { exists $seen{$_} ? undef : $seen{$_} = 1, 1 } @want_tags);
+ # Only take input tags once, and validate them
+ {
+ my %seen;
+ @want_tags = Engine::tags(grep { exists $seen{$_} ? undef : $seen{$_} = 1, 1 } @want_tags);
+ }
}
#Web::timing("parms");
@@ -78,9 +81,13 @@
## Perform the search
##
-my @pkgs = Engine::findPackages({ tags => \@want_tags });
+my (@pkgs, $pkg_count);
+if ($action ne 'begin')
+{
+ @pkgs = Engine::findPackages({ tags => \@want_tags });
-my $pkg_count = scalar @pkgs;
+ $pkg_count = scalar @pkgs;
+}
#Web::timing("nav");
@@ -88,7 +95,7 @@
## Compile template structures
##
-if ($action eq 'start')
+if ($action =~ /start|begin/)
{
# Load the template file
my $template = HTML::Template->new(
More information about the Debtags-commits
mailing list