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

banghart lon-capa-cvs-allow@mail.lon-capa.org
Fri, 17 Aug 2007 22:54:36 -0000


banghart		Fri Aug 17 18:54:36 2007 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  	Show or restrict files regardless of letter case of extension.
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.178 loncom/interface/lonindexer.pm:1.179
--- loncom/interface/lonindexer.pm:1.178	Fri Aug 17 18:27:00 2007
+++ loncom/interface/lonindexer.pm	Fri Aug 17 18:54:36 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.178 2007/08/17 22:27:00 albertel Exp $
+# $Id: lonindexer.pm,v 1.179 2007/08/17 22:54:36 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -481,7 +481,7 @@
         my @file_categories = &Apache::loncommon::filecategories();
         my %select_file_categories;
         my @select_form_order = ('');
-        $select_file_categories{''} = 'All file types';
+        $select_file_categories{''} = &mt('All file types');
         foreach my $cat (@file_categories) {
 	    my $types = join(",",&Apache::loncommon::filecategorytypes($cat));
 	    $select_file_categories{$types} = $cat;
@@ -935,11 +935,11 @@
 	my @file_ext = split (/\./,$listname);
 	my $curfext = $file_ext[-1];
         if (@Omit) {
-            foreach (@Omit) { return OK if ($curfext eq $_); }
+            foreach (@Omit) { return OK if (lc($curfext) eq $_); }
         }
         if (@Only) {
             my $skip = 1;
-            foreach (@Only) { $skip = 0 if ($curfext eq $_); }
+            foreach (@Only) { $skip = 0 if (lc($curfext) eq $_); }
             return OK if ($skip > 0);
         }
 	# Set the icon for the file