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

www lon-capa-cvs@mail.lon-capa.org
Wed, 08 May 2002 15:21:05 -0000


www		Wed May  8 11:21:05 2002 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Work on symb verification, bug 279
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.214 loncom/lonnet/perl/lonnet.pm:1.215
--- loncom/lonnet/perl/lonnet.pm:1.214	Wed May  8 10:37:14 2002
+++ loncom/lonnet/perl/lonnet.pm	Wed May  8 11:21:04 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.214 2002/05/08 14:37:14 www Exp $
+# $Id: lonnet.pm,v 1.215 2002/05/08 15:21:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2525,11 +2525,15 @@
     my ($symb,$thisfn)=@_;
     $thisfn=&declutter($thisfn);
 
-#    &logthis("Symb verify: $symb $thisfn");
+    &logthis("Symb verify: $symb $thisfn");
 
+# direct jump to resource in page or to a sequence - will construct own symbs
+    if ($thisfn=~/\.(page|sequence)$/) { return 1; }
+# check URL part
     my ($map,$resid,$url)=split(/\_\_\_/,$symb);
     unless (&symbclean($url) eq &symbclean($thisfn)) { return 0; }
 
+# FIXME: done for now
     return 1;
 
     my %bighash;
@@ -2547,14 +2551,11 @@
 sub symbclean {
     my $symb=shift;
 
-#    &logthis("Symb in: $symb");
-
 # remove version from map
     $symb=~s/\.(\d+)\.(\w+)\_\_\_/\.$2\_\_\_/;
+
 # remove version from URL
     $symb=~s/\.(\d+)\.(\w+)$/\.$2/;
-
-#    &logthis("Symb out: $symb");
 
     return $symb;
 }