[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn@source.lon-capa.org
Wed, 10 Nov 2010 14:44:20 -0000
raeburn Wed Nov 10 14:44:20 2010 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Typo in comment.
- Coding style: push()
- Subroutine needs return
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1092 loncom/lonnet/perl/lonnet.pm:1.1093
--- loncom/lonnet/perl/lonnet.pm:1.1092 Mon Nov 1 21:19:50 2010
+++ loncom/lonnet/perl/lonnet.pm Wed Nov 10 14:44:19 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1092 2010/11/01 21:19:50 raeburn Exp $
+# $Id: lonnet.pm,v 1.1093 2010/11/10 14:44:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2352,7 +2352,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"}
# $context - possible values: coursedoc, existingfile, overwrite,
# canceloverwrite, or ''.
# if 'coursedoc': upload to the current course
@@ -2442,7 +2442,7 @@
}
if ($subdir eq 'scantron') {
$fname = 'scantron_orig_'.$fname;
- } else {
+ } else {
$fname="$subdir/$fname";
}
if ($context eq 'coursedoc') {
@@ -7288,7 +7288,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);
@@ -7305,6 +7305,7 @@
} else {
$is_locked = 'false';
}
+ return $is_locked;
}
sub declutter_portfile {