[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 07 Oct 2003 07:24:51 -0000
albertel Tue Oct 7 03:24:51 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- a swipe at encode_symb
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.428 loncom/lonnet/perl/lonnet.pm:1.429
--- loncom/lonnet/perl/lonnet.pm:1.428 Tue Oct 7 03:20:05 2003
+++ loncom/lonnet/perl/lonnet.pm Tue Oct 7 03:24:51 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.428 2003/10/07 07:20:05 albertel Exp $
+# $Id: lonnet.pm,v 1.429 2003/10/07 07:24:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2796,10 +2796,8 @@
my $rid=$bighash{'mapalias_'.$symb};
if ($rid) {
my ($mapid,$resid)=split(/\./,$rid);
- $aliassymb=
- &declutter($bighash{'map_id_'.$mapid}).
- '___'.$resid.'___'.
- &declutter($bighash{'src_'.$rid});
+ $aliassymb=&encode_symb($bighash{'map_id_'.$mapid},
+ $resid,$bighash{'src_'.$rid});
}
untie %bighash;
}
@@ -4079,6 +4077,11 @@
}
# ---------------------------------------------- Split symb to find map and url
+
+sub encode_symb {
+ my ($map,$resid,$url)=@_;
+ return &symbclean(&declutter($map).'___'.$resid.'___'.&declutter($url));
+}
sub decode_symb {
my ($map,$resid,$url)=split(/\_\_\_/,shift);