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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 08 Sep 2005 22:37:09 -0000


albertel		Thu Sep  8 18:37:09 2005 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - ignor files that don't end in .tab
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.270 loncom/interface/loncommon.pm:1.271
--- loncom/interface/loncommon.pm:1.270	Tue Jul 12 11:54:19 2005
+++ loncom/interface/loncommon.pm	Thu Sep  8 18:37:06 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.270 2005/07/12 15:54:19 albertel Exp $
+# $Id: loncommon.pm,v 1.271 2005/09/08 22:37:06 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -152,19 +152,20 @@
     my $designdir=$Apache::lonnet::perlvar{'lonTabDir'}.'/lonDomColors';
     opendir(DIR,$designdir);
     while ($filename=readdir(DIR)) {
+	if ($filename!~/\.tab$/) { next; }
 	my ($domain)=($filename=~/^(\w+)\./);
-    {
-        my $designfile = $designdir.'/'.$filename;
-        if ( open (my $fh,"<$designfile") ) {
-            while (<$fh>) {
-                next if /^\#/;
-                chomp;
-                my ($key,$val)=(split(/\=/,$_));
-                if ($val) { $designhash{$domain.'.'.$key}=$val; }
-            }
-            close($fh);
-        }
-    }
+	{
+	    my $designfile = $designdir.'/'.$filename;
+	    if ( open (my $fh,"<$designfile") ) {
+		while (<$fh>) {
+		    next if /^\#/;
+		    chomp;
+		    my ($key,$val)=(split(/\=/,$_));
+		    if ($val) { $designhash{$domain.'.'.$key}=$val; }
+		}
+		close($fh);
+	    }
+	}
 
     }
     closedir(DIR);
@@ -3059,7 +3060,6 @@
     if (!defined($possible_names) || (grep {$_ eq $name} @$possible_names)) {
       $value =~ tr/+/ /;
       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
-      &Apache::lonxml::debug("Seting :$name: to :$value:");
       unless (defined($env{'form.'.$name})) { &add_to_env('form.'.$name,$value) };
     }
   }