[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.67, Fri Sep 29 15:00:17 2006 UTC revision 1.68, Fri Sep 29 19:48:01 2006 UTC
# Line 1953  Line 1953 
1953          # Here we want to trace the parameter data.          # Here we want to trace the parameter data.
1954          my @names = $query->param;          my @names = $query->param;
1955          for my $parmName (sort @names) {          for my $parmName (sort @names) {
1956              # Note we skip "Trace", which is for our use only.              # Note we skip the Trace parameters, which are for our use only.
1957              if ($parmName ne 'Trace') {              if ($parmName ne 'Trace' && $parmName ne 'TF') {
1958                  my @values = $query->param($parmName);                  my @values = $query->param($parmName);
1959                  Trace("CGI: $parmName = " . join(", ", @values));                  Trace("CGI: $parmName = " . join(", ", @values));
1960              }              }
1961          }          }
         # Now output a GET-style URL for this query.  
         my $getURL = $query->url(-relative => 1, -query => 1);  
         # Strip out the Trace parameters.  
         $getURL =~ s/Trace=\d[^;&]+[;&]//;  
         $getURL =~ s/TF=\d[;&]//;  
         # Output the URL.  
         Trace("URL: ../FIG/$getURL");  
1962          # Display the request method.          # Display the request method.
1963          my $method = $query->request_method();          my $method = $query->request_method();
1964          Trace("Method: $method");          Trace("Method: $method");
# Line 2052  Line 2045 
2045          $outputString = $webData;          $outputString = $webData;
2046      }      }
2047      # Check for trace messages.      # Check for trace messages.
2048      if ($Destination eq "QUEUE") {      if ($Destination ne "NONE" && $TraceLevel > 0) {
2049          # We have trace messages, so we want to put them at the end of the body. This          # We have trace messages, so we want to put them at the end of the body. This
2050          # is either at the end of the whole string or at the beginning of the BODY          # is either at the end of the whole string or at the beginning of the BODY
2051          # end-tag.          # end-tag.
# Line 2060  Line 2053 
2053          if ($outputString =~ m#</body>#gi) {          if ($outputString =~ m#</body>#gi) {
2054              $pos = (pos $outputString) - 7;              $pos = (pos $outputString) - 7;
2055          }          }
2056          substr $outputString, $pos, 0, QTrace('Html');          # If the trace messages were queued, we unroll them. Otherwise, we display the
2057            # destination.
2058            my $traceHtml;
2059            if ($Destination eq "QUEUE") {
2060                $traceHtml = QTrace('Html');
2061            } elsif ($Destination =~ /^>>(.+)$/) {
2062                # Here the tracing output it to a file. We code it as a hyperlink so the user
2063                # can copy the file name into the clipboard easily.
2064                my $actualDest = $1;
2065                $traceHtml = "<p>Tracing output to <a href=\"$actualDest\">$actualDest</a>.</p>\n";
2066            } else {
2067                # Here we have one of the special destinations.
2068                $traceHtml = "<P>Tracing output type is $Destination.</p>\n";
2069            }
2070            substr $outputString, $pos, 0, $traceHtml;
2071      }      }
2072      # Write the output string.      # Write the output string.
2073      print $outputString;      print $outputString;

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3