[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 07 Mar 2003 23:45:32 -0000
albertel Fri Mar 7 18:45:32 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- EXT was skiping levels when cascading up
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.335 loncom/lonnet/perl/lonnet.pm:1.336
--- loncom/lonnet/perl/lonnet.pm:1.335 Fri Mar 7 18:37:09 2003
+++ loncom/lonnet/perl/lonnet.pm Fri Mar 7 18:45:31 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.335 2003/03/07 23:37:09 albertel Exp $
+# $Id: lonnet.pm,v 1.336 2003/03/07 23:45:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2831,7 +2831,6 @@
my ($varname,$symbparm,$udom,$uname,)=@_;
unless ($varname) { return ''; }
-
#get real user name/domain, courseid and symb
my $courseid;
if (!($uname && $udom)) {
@@ -3013,16 +3012,12 @@
# ------------------------------------------------------------------ Cascade up
unless ($space eq '0') {
- my ($part,$id)=split(/_/,$space);
- if ($id) {
- my $partgeneral=&EXT('resource.'.$part.'.'.$qualifierrest,
- $symbparm,$udom,$uname);
- if (defined($partgeneral)) { return $partgeneral; }
- } else {
- my $resourcegeneral=&EXT('resource.0.'.$qualifierrest,
- $symbparm,$udom,$uname);
- if (defined($resourcegeneral)) { return $resourcegeneral; }
- }
+ my @parts=split(/_/,$space);
+ my $id=pop(@parts);
+ my $part=join('_',@parts);
+ if ($part eq '') { $part='0'; }
+ my $partgeneral=&EXT('resource.'.$part.'.'.$qualifierrest,
+ $symbparm,$udom,$uname);
}
# ---------------------------------------------------- Any other user namespace