--- loncom/interface/lonindexer.pm 2014/06/09 21:35:19 1.213.4.7 +++ loncom/interface/lonindexer.pm 2015/01/23 22:59:28 1.213.4.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.213.4.7 2014/06/09 21:35:19 raeburn Exp $ +# $Id: lonindexer.pm,v 1.213.4.8 2015/01/23 22:59:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -623,7 +623,7 @@ END # ----------------- read in what directories have previously been set to "open" - foreach (keys %hash) { + foreach (keys(%hash)) { if ($_ =~ /^diropen_status_/) { my $key = $_; $key =~ s/^diropen_status_//; @@ -754,7 +754,7 @@ sub get_list { (my $luri = $uri) =~ s/\//_/g; if ($env{'form.updatedisplay'}) { - foreach (keys %hash) { + foreach (keys(%hash)) { delete $hash{$_} if ($_ =~ /^dirlist_files_/); delete $hash{$_} if ($_ =~ /^dirlist_timestamp_files_/); } @@ -989,6 +989,9 @@ $r->print (''. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); + my $quotable_startdir = &Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); + $r->print (''.$msg.''); @@ -1000,7 +1003,7 @@ $r->print (''. + 'onclick="set_wishlistlink('."'$plainname','$quotable_startdir$quotable_listname"."/'".')">'. ''.$tabtag); $r->print(&Apache::loncommon::end_data_table_row()); @@ -1083,6 +1086,8 @@ $r->print ('\n"); my $quotable_filelink = &Apache::loncommon::escape_single($filelink); + my $quotable_startdir = Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); $r->print (" $listname "); $quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta'); @@ -1096,7 +1101,7 @@ $r->print (''. + "','$quotable_startdir$quotable_listname'".')">'. ''); if ($hash{'display_attrs_0'} == 1) { @@ -1238,7 +1243,9 @@ $r->print (''. "\n"); my $quotable_curdir = &Apache::loncommon::escape_single($curdir); - + my $quotable_startdir = &Apache::loncommon::escape_single($startdir); + my $quotable_listname = &Apache::loncommon::escape_single($listname); + my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons"); my $icon = "navmap.folder.".($nowOpen ? "open":"closed").'.gif'; $r->print (''. + 'onclick="set_wishlistlink('."'$listname','$quotable_startdir$quotable_listname"."/'".')">'. ''); # Attributes @@ -1432,7 +1439,7 @@ sub start_fresh_session { delete $hash->{'form.element'}; delete $hash->{'form.omit'}; delete $hash->{'form.only'}; - foreach (keys %{$hash}) { + foreach (keys(%{$hash})) { delete $hash->{$_} if (/^(pre_|store)/); } }