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

Diff of /FigKernelPackages/FIG.pm

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

revision 1.381, Mon Oct 24 19:36:38 2005 UTC revision 1.382, Mon Oct 24 21:50:35 2005 UTC
# Line 1897  Line 1897 
1897      return ".";      return ".";
1898  }  }
1899    
1900    =head3 top_link
1901    
1902    C<< my $url = FIG::top_link(); >>
1903    
1904    Return the relative URL for the top of the CGI script directory.
1905    
1906    We determine this based on the SCRIPT_NAME environment variable, falling
1907    back to FIG_Config::cgi_base if necessary.
1908    
1909    =cut
1910    
1911    sub top_link
1912    {
1913    
1914        #
1915        # Determine if this is a toplevel cgi or one in one of the subdirs (currently
1916        # just /p2p).
1917        #
1918    
1919        my @parts = split(/\//, $ENV{SCRIPT_NAME});
1920        my $top;
1921        if ($parts[-2] eq 'FIG')
1922        {
1923            $top = '.';
1924    #       warn "toplevel @parts\n";
1925        }
1926        elsif ($parts[-3] eq 'FIG')
1927        {
1928            $top = '..';
1929    #       warn "subdir @parts\n";
1930        }
1931        else
1932        {
1933            $top = $FIG_Config::cgi_base;
1934    #       warn "other @parts\n";
1935        }
1936    
1937        return $top;
1938    }
1939    
1940  =head3 temp_url  =head3 temp_url
1941    
1942  C<< my $url = FIG::temp_url(); >>  C<< my $url = FIG::temp_url(); >>

Legend:
Removed from v.1.381  
changed lines
  Added in v.1.382

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3