fix fix multiple pkgpart search (need sanity check): don't let empty set limit search
authorjeff <jeff>
Thu, 13 Aug 2009 15:13:49 +0000 (15:13 +0000)
committerjeff <jeff>
Thu, 13 Aug 2009 15:13:49 +0000 (15:13 +0000)
FS/FS/cust_pkg.pm

index 4e57fbf..e7f8484 100644 (file)
@@ -2476,7 +2476,7 @@ sub search_sql {
 
     @pkgpart = grep /^(\d+)$/, @pkgpart;
 
-    push @where, 'pkgpart IN ('. join(',', @pkgpart). ')';
+    push @where, 'pkgpart IN ('. join(',', @pkgpart). ')' if scalar(@pkgpart);
 
   } elsif ( $params->{'pkgpart'} =~ /^(\d+)$/ ) {
     push @where, "pkgpart = $1";