[Bio] / Sprout / ResultHelper.pm Repository:
ViewVC logotype

Diff of /Sprout/ResultHelper.pm

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

revision 1.5, Thu Dec 6 14:58:03 2007 UTC revision 1.6, Wed Sep 3 20:54:47 2008 UTC
# Line 489  Line 489 
489      # Compute the target HTML.      # Compute the target HTML.
490      my $targetHtml = ($target ? " target=\"$target\"" : "");      my $targetHtml = ($target ? " target=\"$target\"" : "");
491      # Start the form.      # Start the form.
492      my $retVal = "<form method=\"POST\" action=\"$url\"$target>";      my $retVal = "<form method=\"POST\" action=\"$FIG_Config::cgi_url/$url\"$target>";
493      # Add the parameters.      # Add the parameters.
494      for my $parm (keys %parms) {      for my $parm (keys %parms) {
495          $retVal .= "<input type=\"hidden\" name=\"$parm\" value=\"$parms{$parm}\" />";          $retVal .= "<input type=\"hidden\" name=\"$parm\" value=\"$parms{$parm}\" />";
# Line 681  Line 681 
681      }      }
682      # Now a final cleanup. If we have a URL and it's relative, we need to add our path to it.      # Now a final cleanup. If we have a URL and it's relative, we need to add our path to it.
683      if ($retVal && $retVal !~ m#http://#) {      if ($retVal && $retVal !~ m#http://#) {
684          # The link doesn't begin with http, so we must fix it. Get our URL.          # The link doesn't begin with http, so we must fix it.
685          my $cgi = CGI->new();          $retVal = "$FIG_Config::cgi_url/$retVal";
         my $selfURL = $cgi->url(-full => 1);  
         # Strip off the page name.  
         $selfURL =~ m#^(.+)/[^/]+$#;  
         my $path = $1;  
         # Combine it with the relative URL.  
         $retVal = "$1/$retVal";  
686      }      }
687      # Return the result.      # Return the result.
688      return $retVal;      return $retVal;
# Line 735  Line 729 
729      # Declare the return variable.      # Declare the return variable.
730      my $retVal;      my $retVal;
731      # Compute the target URL.      # Compute the target URL.
732      my $targetUrl = "$url?" . join(";", map { "$_=" . uri_escape($parms{$_}) } keys %parms);      my $targetUrl = "$FIG_Config::cgi_url/$url?" . join(";", map { "$_=" . uri_escape($parms{$_}) } keys %parms);
733      # Compute the target-frame HTML.      # Compute the target-frame HTML.
734      my $targetHtml = ($target ? " target=\"$target\"" : "");      my $targetHtml = ($target ? " target=\"$target\"" : "");
735      # Assemble the result.      # Assemble the result.

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3