[LON-CAPA-cvs] cvs: loncom /auth lonacc.pm

raeburn raeburn at source.lon-capa.org
Tue Aug 21 13:51:59 EDT 2012


raeburn		Tue Aug 21 17:51:59 2012 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
  Log:
  - Bug 6587.
    Only check for "empty" file for file upload to portfolio.
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.138 loncom/auth/lonacc.pm:1.139
--- loncom/auth/lonacc.pm:1.138	Wed May 30 20:29:49 2012
+++ loncom/auth/lonacc.pm	Tue Aug 21 17:51:58 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.138 2012/05/30 20:29:49 raeburn Exp $
+# $Id: lonacc.pm,v 1.139 2012/08/21 17:51:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,7 +156,13 @@
 	for ($i=0;$i<=$#lines;$i++) {
 	    if ($lines[$i]=~/^--\Q$contentsep\E/) {
 		if ($name) {
-		    $value=~s/[\r\n]+$//;
+                    chomp($value);
+                    if (($r->uri eq '/adm/portfolio') && 
+                        ($name eq 'uploaddoc')) {
+                        if (length($value) == 1) {
+                            $value=~s/[\r\n]$//;
+                        }
+                    }
                     if (ref($fields) eq 'ARRAY') {
                         next if (!grep(/^\Q$name\E$/,@{$fields}));
                     }




More information about the LON-CAPA-cvs mailing list