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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Tue, 25 Dec 2007 04:02:04 -0000


raeburn		Mon Dec 24 23:02:04 2007 EDT

  Modified files:              
    /loncom	lond 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  lond
  - storage of course information by &courseidput(), i.e., data coming from pre 2.6.X servers - unescape the values received since the freeze_escape() used to store them does the escaping.  
  
  lonnet.pm
  - when flushing logs, do not escape items in buffers because &courseidput() either uses freeze_escape() for 2.6.X home servers, or does the escaping when building the string to send to pre-2.6.X home servers.
  
  - $storehash is a hash of a hash - need the top level key.
  
  
Index: loncom/lond
diff -u loncom/lond:1.390 loncom/lond:1.391
--- loncom/lond:1.390	Mon Nov 12 17:54:42 2007
+++ loncom/lond	Mon Dec 24 23:01:57 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.390 2007/11/12 22:54:42 raeburn Exp $
+# $Id: lond,v 1.391 2007/12/25 04:01:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.390 $'; #' stupid emacs
+my $VERSION='$Revision: 1.391 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -3312,7 +3312,7 @@
                     my @new_items = split(/:/,$courseinfo,-1);
                     my %storehash; 
                     for (my $i=0; $i<@new_items; $i++) {
-                        $storehash{$items[$i]} = $new_items[$i];
+                        $storehash{$items[$i]} = &unescape($new_items[$i]);
                     }
                     $hashref->{$key} = 
                         &Apache::lonnet::freeze_escape(\%storehash);
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.935 loncom/lonnet/perl/lonnet.pm:1.936
--- loncom/lonnet/perl/lonnet.pm:1.935	Thu Dec 20 23:34:50 2007
+++ loncom/lonnet/perl/lonnet.pm	Mon Dec 24 23:02:00 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.935 2007/12/21 04:34:50 raeburn Exp $
+# $Id: lonnet.pm,v 1.936 2007/12/25 04:02:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2200,10 +2200,10 @@
             }
         }
         $courseidbuffer{$coursehombuf{$crsid}}{$crsid} = {
-            'description' => &escape($coursedescrbuf{$crsid}),
-            'inst_code'    => &escape($courseinstcodebuf{$crsid}),
-            'type'        => &escape($coursetypebuf{$crsid}),
-            'owner'       => &escape($courseownerbuf{$crsid}),
+            'description' => $coursedescrbuf{$crsid},
+            'inst_code'    => $courseinstcodebuf{$crsid},
+            'type'        => $coursetypebuf{$crsid},
+            'owner'       => $courseownerbuf{$crsid},
         };
     }
 #
@@ -2555,7 +2555,7 @@
         foreach my $cid (keys(%$storehash)) {
             $what .= &escape($cid).'=';
             foreach my $item ('description','inst_code','owner','type') {
-                $what .= &escape($storehash->{$item}).':';
+                $what .= &escape($storehash->{$cid}{$item}).':';
             }
             $what =~ s/\:$/&/;
         }