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

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 16 Sep 2002 12:52:34 -0000


matthew		Mon Sep 16 08:52:34 2002 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  Changes to address at least part of bug 775.  Changed the logic which 
  determines when to clean out the groupsearch database file.  Previously it
  only occurred if the results were about to be displayed.  This was unfortunate
  because the parameter which triggered it is deleted before then.
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.155 loncom/interface/lonsearchcat.pm:1.156
--- loncom/interface/lonsearchcat.pm:1.155	Mon Aug 26 10:34:19 2002
+++ loncom/interface/lonsearchcat.pm	Mon Sep 16 08:52:33 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.155 2002/08/26 14:34:19 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.156 2002/09/16 12:52:33 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -178,6 +178,10 @@
     $r->content_type('text/html');
     $r->send_http_header;
     return OK if $r->header_only;
+    ##
+    ## Prevent caching of the search interface window.  Hopefully this means
+    ## we will get the launch=1 passed in a little more.
+    &Apache::loncommon::no_cache($r);
     ## 
     ## Pick up form fields passed in the links.
     ##
@@ -234,9 +238,8 @@
     ## Clear out old values from groupsearch database
     ##
     untie %groupsearch_db if (tied(%groupsearch_db));
-    if ($ENV{'form.launch'} eq '1' && 
-        ($ENV{'form.catalogmode'} eq 'groupsearch') && 
-        ($ENV{'form.phase'} eq 'results')) {
+    if (($ENV{'form.launch'} eq '1') && 
+        ($ENV{'form.catalogmode'} eq 'groupsearch')) {
 	if (tie(%groupsearch_db,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {
 	    &start_fresh_session();
 	    untie %groupsearch_db;