--- loncom/interface/lonindexer.pm 2014/05/31 16:01:33 1.221
+++ loncom/interface/lonindexer.pm 2016/06/18 16:15:38 1.224
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.221 2014/05/31 16:01:33 raeburn Exp $
+# $Id: lonindexer.pm,v 1.224 2016/06/18 16:15:38 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_//;
@@ -709,7 +709,7 @@ sub scanDir {
return if ($c->aborted());
#This is a kludge, sorry aboot this
my ($strip,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
- next if($strip =~ /.*\.meta$/ | $obs eq '1');
+ next if (($strip =~ /\.meta$/) || ($obs));
my (@fileparts) = split(/\./,$strip);
if ($hash{'display_attrs_9'} != 1) {
# if not all versions to be shown
@@ -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 ('
');
@@ -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)/);
}
}