[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm

www lon-capa-cvs@mail.lon-capa.org
Sun, 05 Feb 2006 20:56:57 -0000


www		Sun Feb  5 15:56:57 2006 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  Bug #4644 - Advanced search now works without domain restrictions.
  I wonder how this code could ever have worked ...
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.250 loncom/interface/lonsearchcat.pm:1.251
--- loncom/interface/lonsearchcat.pm:1.250	Thu Dec 29 14:45:19 2005
+++ loncom/interface/lonsearchcat.pm	Sun Feb  5 15:56:57 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.250 2005/12/29 19:45:19 www Exp $
+# $Id: lonsearchcat.pm,v 1.251 2006/02/05 20:56:57 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1542,8 +1542,10 @@
     ## 
     my ($libraries_to_query,$pretty_domains_string,$domain_sql_restriction) = 
         &parse_domain_restrictions();
-    push(@queries,$domain_sql_restriction);
-    $pretty_search_string .= $pretty_domains_string."<br />\n";
+    if ((defined($domain_sql_restriction)) && ($domain_sql_restriction ne '')) {
+       push(@queries,$domain_sql_restriction);
+       $pretty_search_string .= $pretty_domains_string."<br />\n";
+    }
     #
     if (@queries) {
 	$query="SELECT * FROM metadata WHERE (".join(") AND (",@queries).')';