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

www lon-capa-cvs@mail.lon-capa.org
Fri, 23 Jun 2006 07:02:52 -0000


www		Fri Jun 23 03:02:52 2006 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  A little bit more Bug #4833: unlink old tmp file on "Update Display"
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.146 loncom/interface/lonindexer.pm:1.147
--- loncom/interface/lonindexer.pm:1.146	Fri Jun 23 02:39:09 2006
+++ loncom/interface/lonindexer.pm	Fri Jun 23 03:02:51 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.146 2006/06/23 06:39:09 www Exp $
+# $Id: lonindexer.pm,v 1.147 2006/06/23 07:02:51 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1162,6 +1162,11 @@
           $output=join("\n",<FH>);
           close(FH);
        } else {
+# In update display mode, remove old cache. This is done to retroactively
+# clean up course context renderings.
+	  if (-e $cache) {
+	       unlink($cache);
+	  }
           $output=&Apache::lonnet::ssi_body($filelink);
 # Is access denied? Don't render, don't store
           if ($output=~/LONCAPAACCESSCONTROLERRORSCREEN/s) {