[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonrecommender.pm

www www at source.lon-capa.org
Mon Jul 16 21:23:28 EDT 2012


www		Tue Jul 17 01:23:28 2012 EDT

  Modified files:              
    /modules/gerd/harvesting	lonrecommender.pm 
  Log:
  Identify obsolete files and directories
  
  
Index: modules/gerd/harvesting/lonrecommender.pm
diff -u modules/gerd/harvesting/lonrecommender.pm:1.14 modules/gerd/harvesting/lonrecommender.pm:1.15
--- modules/gerd/harvesting/lonrecommender.pm:1.14	Tue Jul 17 00:11:42 2012
+++ modules/gerd/harvesting/lonrecommender.pm	Tue Jul 17 01:23:28 2012
@@ -5,7 +5,7 @@
 #
 # MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
 #
-# $Id: lonrecommender.pm,v 1.14 2012/07/17 00:11:42 www Exp $
+# $Id: lonrecommender.pm,v 1.15 2012/07/17 01:23:28 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -570,6 +570,15 @@
       if (($type eq 'domain') || ($type eq 'user')) { 
          $addflag=0;
          $dirflag=1;
+      } else {
+# second to last entry of normal files is "obsolete"
+         if ($components[-2]) { next; }
+# is this a directory?
+         my $dirptr=16384;
+         if ($components[3]&$dirptr) { 
+            $dirflag=1; 
+            $addflag=0;
+         }
       }
       $r->print("<tr><td>");
       if ($addflag) { 




More information about the LON-CAPA-cvs mailing list