[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Wed Apr 2 18:19:56 EDT 2014


raeburn		Wed Apr  2 22:19:56 2014 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Bug 6692
    - previous bug fix (rev. 1.576) for bug 6692 caused different bug
      (javascript error) in Course Editor when renaming item with single quote 
      in item name -- now also fixed with this new change.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.580 loncom/interface/londocs.pm:1.581
--- loncom/interface/londocs.pm:1.580	Tue Mar 11 00:57:23 2014
+++ loncom/interface/londocs.pm	Wed Apr  2 22:19:56 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.580 2014/03/11 00:57:23 raeburn Exp $
+# $Id: londocs.pm,v 1.581 2014/04/02 22:19:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3345,7 +3345,7 @@
 sub entryline {
     my ($index,$title,$url,$folder,$allowed,$residx,$coursenum,$coursedom,
         $crstype,$pathitem,$supplementalflag,$container,$filtersref,$currgroups)=@_;
-    my ($foldertitle,$renametitle);
+    my ($foldertitle,$renametitle,$oldtitle);
     if (&is_supplemental_title($title)) {
 	($title,$foldertitle,$renametitle) = &Apache::loncommon::parse_supplemental_title($title);
     } else {
@@ -3358,8 +3358,9 @@
 
     $renametitle=~s/\\/\\\\/g;
     $renametitle=~s/\&quot\;/\\\"/g;
-    $renametitle=~s/\'/\\\'/g;
     $renametitle=~s/ /%20/g;
+    $oldtitle = $renametitle;
+    $renametitle=~s/\'/\\\'/g;
     my $line=&Apache::loncommon::start_data_table_row();
     my ($form_start,$form_end,$form_common,$form_param);
 # Edit commands
@@ -3509,7 +3510,7 @@
             }
         }
         $renamelink=(<<ENDREN);
-<a href='javascript:changename("$esc_path","$index","$renametitle");' class="LC_docs_rename">$lt{'rn'}</a>
+<a href='javascript:changename("$esc_path","$index","$oldtitle");' class="LC_docs_rename">$lt{'rn'}</a>
 ENDREN
 	$line.=(<<END);
 <td>




More information about the LON-CAPA-cvs mailing list