[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Thu, 11 Nov 2010 21:01:39 -0000


raeburn		Thu Nov 11 21:01:39 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Backport 1.1093.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1056.2.9 loncom/lonnet/perl/lonnet.pm:1.1056.2.10
--- loncom/lonnet/perl/lonnet.pm:1.1056.2.9	Thu Nov 11 20:56:04 2010
+++ loncom/lonnet/perl/lonnet.pm	Thu Nov 11 21:01:38 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1056.2.9 2010/11/11 20:56:04 raeburn Exp $
+# $Id: lonnet.pm,v 1.1056.2.10 2010/11/11 21:01:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2195,7 +2195,7 @@
 
 # --------------- Take an uploaded file and put it into the userfiles directory
 # input: $formname - the contents of the file are in $env{"form.$formname"}
-#                    the desired filenam is in $env{"form.$formname.filename"}
+#                    the desired filename is in $env{"form.$formname.filename"}
 #        $coursedoc - if true up to the current course
 #                     if false
 #        $subdir - directory in userfile to store the file into
@@ -2254,7 +2254,7 @@
     }
     if ($subdir eq 'scantron') {
         $fname = 'scantron_orig_'.$fname;
-    } else {   
+    } else {
 # Create the directory if not present
         $fname="$subdir/$fname";
     }
@@ -7118,7 +7118,7 @@
     my ($file_name, $domain, $user) = @_;
     my @check;
     my $is_locked;
-    push @check, $file_name;
+    push(@check,$file_name);
     my %locked = &get('file_permissions',\@check,
 		      $env{'user.domain'},$env{'user.name'});
     my ($tmp)=keys(%locked);
@@ -7135,6 +7135,7 @@
     } else {
         $is_locked = 'false';
     }
+    return $is_locked;
 }
 
 sub declutter_portfile {