[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.66, Wed Oct 12 21:03:16 2005 UTC revision 1.67, Wed Oct 12 21:53:22 2005 UTC
# Line 36  Line 36 
36      }      }
37      my @html_hdr = &FIG::file_read($html_hdr_file);      my @html_hdr = &FIG::file_read($html_hdr_file);
38    
39      $options{no_fig_search} or push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );      # for my $k (sort keys %ENV) { warn "$k = $ENV{$k}\n"; }
40    
41        #
42        # Determine if this is a toplevel cgi or one in one of the subdirs (currently
43        # just /p2p).
44        #
45    
46        my @parts = split(/\//, $ENV{SCRIPT_NAME});
47        my $top;
48        if ($parts[-2] eq 'FIG')
49        {
50            $top = '.';
51    #       warn "toplevel @parts\n";
52        }
53        elsif ($parts[-3] eq 'FIG')
54        {
55            $top = '..';
56    #       warn "subdir @parts\n";
57        }
58        else
59        {
60            $top = $FIG_Config::cgi_base;
61    #       warn "other @parts\n";
62        }
63    
64        $options{no_fig_search} or push( @html_hdr, "<br><a href=\"$top/index.cgi?user=$user\">FIG search</a>\n" );
65    
66      if (@html_hdr)      if (@html_hdr)
67      {      {
# Line 64  Line 89 
89    
90          for $_ (@html_hdr)          for $_ (@html_hdr)
91          {          {
92              s,(href|img\s+src)="/FIG/,\1=".,g;              s,(href|img\s+src)="/FIG/,\1="$top/,g;
93              s,(\?user\=)\",$1$user",;              s,(\?user\=)\",$1$user",;
94              if ($_ eq "<!-- HEADER_INSERT -->\n")              if ($_ eq "<!-- HEADER_INSERT -->\n")
95              {              {

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3