[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 20 Apr 2007 20:55:01 -0000


albertel		Fri Apr 20 16:55:01 2007 EDT

  Modified files:              
    /loncom/publisher	loncfile.pm 
  Log:
  - don't complain about mime types if the lc of the extension is the same
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.81 loncom/publisher/loncfile.pm:1.82
--- loncom/publisher/loncfile.pm:1.81	Fri Mar 30 16:37:31 2007
+++ loncom/publisher/loncfile.pm	Fri Apr 20 16:55:01 2007
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.81 2007/03/30 20:37:31 albertel Exp $
+# $Id: loncfile.pm,v 1.82 2007/04/20 20:55:01 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -300,9 +300,9 @@
     my $newsuffix;
     if ($new=~m:(.*/*)([^/]+)\.(\w+)$:) { $newsuffix=$3; }
     if ($old=~m:(.*)/+([^/]+)\.(\w+)$:) { $oldsuffix=$3; }
-    if ($oldsuffix ne $newsuffix) {
+    if (lc($oldsuffix) ne lc($newsuffix)) {
 	$result.=
-            '<p><font color="red">'.&mt('Warning: change of MIME type!').'</font></p>';
+            '<p><span class="LC_warning">'.&mt('Warning: change of MIME type!').'</span></p>';
     }
     return $result;
 }
@@ -463,9 +463,9 @@
 	    if (-d $fn) {
 		$newfilename=~/\.(\w+)$/;
 		if (&Apache::loncommon::fileembstyle($1) eq 'ssi') {
-		    $request->print('<br /><font color="red">'.
+		    $request->print('<br /><span classr="LC_warning">'.
 				    &mt('Cannot change MIME type of a directory').
-				    '</font>'.
+				    '</span>'.
 				    '<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>');
 		    return;
 		}