[LON-CAPA-cvs] cvs: rat / lonratedt.pm loncom/interface groupsort.pm loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 12 Sep 2006 22:13:13 -0000


albertel		Tue Sep 12 18:13:13 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm groupsort.pm 
    /rat	lonratedt.pm 
  Log:
  - fix and issue with dirs with ' in them in the last known location is res browsing
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.452 loncom/interface/loncommon.pm:1.453
--- loncom/interface/loncommon.pm:1.452	Tue Sep 12 15:03:15 2006
+++ loncom/interface/loncommon.pm	Tue Sep 12 18:13:05 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.452 2006/09/12 19:03:15 albertel Exp $
+# $Id: loncommon.pm,v 1.453 2006/09/12 22:13:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -257,7 +257,7 @@
 sub browser_and_searcher_javascript {
     my ($mode)=@_;
     if (!defined($mode)) { $mode='edit'; }
-    my $resurl=&lastresurl();
+    my $resurl=&escape_single(&lastresurl());
     return <<END;
 // <!-- BEGIN LON-CAPA Internal
     var editbrowser = null;
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.48 loncom/interface/groupsort.pm:1.49
--- loncom/interface/groupsort.pm:1.48	Mon Jul 31 14:39:15 2006
+++ loncom/interface/groupsort.pm	Tue Sep 12 18:13:05 2006
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.48 2006/07/31 18:39:15 albertel Exp $
+# $Id: groupsort.pm,v 1.49 2006/09/12 22:13:05 albertel Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -349,7 +349,8 @@
 END
 
         # --- Continue Buttons
-        my $resurl = &Apache::loncommon::lastresurl();
+        my $resurl = 
+	   &Apache::loncommon::escape_single(&Apache::loncommon::lastresurl());
         $r->print(<<END);
 <input type="button" name="alter" value="$lt{'ci'}"
  onClick="window.location='$resurl?catalogmode=import'" />&nbsp;
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.82 rat/lonratedt.pm:1.83
--- rat/lonratedt.pm:1.82	Thu Jul 20 00:17:45 2006
+++ rat/lonratedt.pm	Tue Sep 12 18:13:12 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.82 2006/07/20 04:17:45 albertel Exp $
+# $Id: lonratedt.pm,v 1.83 2006/09/12 22:13:12 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -649,7 +649,8 @@
 # ----------------------------------------------------------------- Edit script
 sub editscript {
     my $mode=shift;
-    my $resurl=&Apache::loncommon::lastresurl();
+    my $resurl=
+	&Apache::loncommon::escape_single(&Apache::loncommon::lastresurl());
     return(<<ENDSCRIPT);
 var srch;
 var srchflag=-1; // 1 means currently open
@@ -694,7 +695,7 @@
    var options="scrollbars=1,resizable=1,menubar=0,location=1,toolbar=1";
    idxmode=mode;
    idxflag=1;
-   idx=open("$resurl/?launch=1&mode=$mode&catalogmode="+mode,"idxout",options);
+   idx=open('$resurl/?launch=1&mode=$mode&catalogmode='+mode,'idxout',options);
    idx.focus();
 }