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

Diff of /FigKernelPackages/HTML.pm

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

revision 1.4, Fri Mar 19 20:26:58 2004 UTC revision 1.5, Fri Mar 19 21:58:31 2004 UTC
# Line 29  Line 29 
29    
30    
31      print $cgi->header;      print $cgi->header;
32      print "<base href=\"" . &FIG::cgi_url . "/\">\n";  
33        #
34        #  Use a relative base address for pages.  Also, because I am worried
35        #  about when FIG_config.pm gets updated (clean installs only, or every
36        #  update?), I provide an alternative derivation from $cgi_url. -- GJO
37        #
38        #  print "<base href=\"" . &FIG::cgi_url . "/\">\n";
39        #
40        my $base_url = $FIG_Config::cgi_base;
41        if ( ! $base_url )                      # if cgi_base was not defined
42        {
43            $base_url = $FIG_Config::cgi_url;   # get the full cgi url
44            $base_url =~ s~^http://[^/]*~~;     # remove protocol and host
45            $base_url =~ m~/$~ || $base_url =~ s~$~/~;  # and add trailing slash?
46        }
47        print "<base href=\"$base_url\">\n";
48    
49      for ($i=0; ($i < @$html) && ($html->[$i] !~ /\<body\>/i); $i++) {}      for ($i=0; ($i < @$html) && ($html->[$i] !~ /\<body\>/i); $i++) {}
50      if ($i < @$html)      if ($i < @$html)
51      {      {

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3