[Debtags-commits] [svn] r1487 - central-database/branches/alioth/webfrontend

Enrico Zini enrico at costa.debian.org
Mon Nov 14 14:53:50 UTC 2005


Author: enrico
Date: Mon Nov 14 14:53:49 2005
New Revision: 1487

Modified:
   central-database/branches/alioth/webfrontend/Engine.pm
Log:
Search by word ANDed words already

Modified: central-database/branches/alioth/webfrontend/Engine.pm
==============================================================================
--- central-database/branches/alioth/webfrontend/Engine.pm	(original)
+++ central-database/branches/alioth/webfrontend/Engine.pm	Mon Nov 14 14:53:49 2005
@@ -391,7 +391,7 @@
 {
 	my ($parms, $p) = @_;
 
-#	my $verbose = ($p->name eq 'freedroid-data');
+#	my $verbose = ($p->name eq 'archmbox');
 
 #	&main::msg("Match %s with t:%s w:%s\n", $p->name(), join(', ', @{$parms->{tags}}), join(', ', @{$parms->{words}}));
 
@@ -413,11 +413,10 @@
 		for my $w (@{$parms->{words}})
 		{
 			my $re = qr/$w/io;
-			# TODO: AND the words instead of ORing
-			return undef if !(
-				$p->name() =~ $re &&
-				$p->sdesc() =~ $re &&
-				$p->ldesc() =~ $re);
+			return undef if 
+				$p->name() !~ $re ||
+				$p->sdesc() !~ $re ||
+				$p->ldesc() !~ $re;
 		}
 	}
 



More information about the Debtags-commits mailing list