[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 22 Mar 2005 16:49:25 -0000
albertel Tue Mar 22 11:49:25 2005 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- sorry I was stupid
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.614 loncom/lonnet/perl/lonnet.pm:1.615
--- loncom/lonnet/perl/lonnet.pm:1.614 Mon Mar 21 13:53:51 2005
+++ loncom/lonnet/perl/lonnet.pm Tue Mar 22 11:49:25 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.614 2005/03/21 18:53:51 albertel Exp $
+# $Id: lonnet.pm,v 1.615 2005/03/22 16:49:25 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3717,8 +3717,8 @@
push @check, $file_name;
my %locked = &get('file_permissions',\@check,
$ENV{'user.domain'},$ENV{'user.name'});
-# my ($tmp)=keys(%locked);
-# if ($tmp=~/^error:/) { undef(%locked); }
+ my ($tmp)=keys(%locked);
+ if ($tmp=~/^error:/) { undef(%locked); }
if (ref($locked{$file_name}) eq 'ARRAY') {
$is_locked = 'true';
@@ -3732,8 +3732,8 @@
sub mark_as_readonly {
my ($domain,$user,$files,$what) = @_;
my %current_permissions = &dump('file_permissions',$domain,$user);
-# my ($tmp)=keys(%current_permissions);
-# if ($tmp=~/^error:/) { undef(%current_permissions); }
+ my ($tmp)=keys(%current_permissions);
+ if ($tmp=~/^error:/) { undef(%current_permissions); }
foreach my $file (@{$files}) {
push(@{$current_permissions{$file}},$what);
@@ -3816,8 +3816,8 @@
sub get_marked_as_readonly {
my ($domain,$user,$what) = @_;
my %current_permissions = &dump('file_permissions',$domain,$user);
-# my ($tmp)=keys(%current_permissions);
-# if ($tmp=~/^error:/) { undef(%current_permissions); }
+ my ($tmp)=keys(%current_permissions);
+ if ($tmp=~/^error:/) { undef(%current_permissions); }
my @readonly_files;
while (my ($file_name,$value) = each(%current_permissions)) {
@@ -3838,8 +3838,8 @@
sub get_marked_as_readonly_hash {
my ($domain,$user,$what) = @_;
my %current_permissions = &dump('file_permissions',$domain,$user);
-# my ($tmp)=keys(%current_permissions);
-# if ($tmp=~/^error:/) { undef(%current_permissions); }
+ my ($tmp)=keys(%current_permissions);
+ if ($tmp=~/^error:/) { undef(%current_permissions); }
my %readonly_files;
while (my ($file_name,$value) = each(%current_permissions)) {
@@ -3862,8 +3862,8 @@
# for portfolio submissions, $what contains $crsid and $symb
my ($domain,$user,$what) = @_;
my %current_permissions = &dump('file_permissions',$domain,$user);
-# my ($tmp)=keys(%current_permissions);
-# if ($tmp=~/^error:/) { undef(%current_permissions); }
+ my ($tmp)=keys(%current_permissions);
+ if ($tmp=~/^error:/) { undef(%current_permissions); }
my @readonly_files = &get_marked_as_readonly($domain,$user,$what);
foreach my $file(@readonly_files){