X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fcgi%2Fmkindextheory.pl;h=424f688ff0bd747ddbbaac458310fb4c6d869809;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=05bb5b925bf91fbc48255c9c25b0ef4afe79373b;hpb=f79d66d3f1e28269afdeab16b78b21f7cecdbd65;p=helm.git diff --git a/helm/cgi/mkindextheory.pl b/helm/cgi/mkindextheory.pl index 05bb5b925..424f688ff 100755 --- a/helm/cgi/mkindextheory.pl +++ b/helm/cgi/mkindextheory.pl @@ -20,13 +20,14 @@ use CGI; my $cgi = new CGI($ENV{"REQUEST_URL"}); $uri = $cgi->param('theoryuri'); +$getterURL = $cgi->param('getterURL'); $uri =~ s/(.*)\/$/$1/; # Remove a final slash if present $uri .= "/"; # Put a final slash $myurl = $cgi->url(); $cont = ""; # modified by side-effect by &callback my $ua = LWP::UserAgent->new; -my $request = HTTP::Request->new(GET => $getter_url."ls?format=txt&baseuri=".$uri); +my $request = HTTP::Request->new(GET => $getterURL."ls?format=txt&baseuri=".$uri); my $response = $ua->request($request, \&callback); @filenames = split(/\n/, $cont); @@ -38,18 +39,21 @@ if ($uri ne "theory:/") { $output = < [BACK] -Parent Directory +Parent Directory EOT } foreach $i (@filenames) { - my ($type,$name) = split(/,/, $i); + my ($type,$name,$flags) = split(/, /, $i); + my ($flagscic, $flagstypes) = split(/,/, $flags); + $flagscic =~ s/^<(.*)/$1/; + $flagstypes =~ s/(.*)>$/$1/; if ($type eq "dir") { $output .= < [DIR] -$name +$name EOT } elsif ($type eq "object") { @@ -58,7 +62,7 @@ EOT $output .= < [DIR] -$name +$name EOT } else {