Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Apr 2006 23:32:18 +0200
From:      Craig Manley <cmanley@xs4all.nl>
To:        freebsd-cvsweb@freebsd.org
Subject:   Patch to make cvsweb.cgi work with relative icon and css paths
Message-ID:  <442EF162.6090406@xs4all.nl>

next in thread | raw e-mail | index | archive | help
To whom cares,

This is the patch I just made. It also contains a fix for making warns 
and die's work when run in ModPerl::PerlRun.

144a145,149
 >
 > $ENV{'MOD_PERL_API_VERSION'} && ($ENV{'MOD_PERL_API_VERSION'} >= 2) 
&& (local $SIG{__WARN__} = \&Apache2::ServerRec::warn);
 > $ENV{'MOD_PERL_API_VERSION'} && ($ENV{'MOD_PERL_API_VERSION'} >= 2) 
&& (local $SIG{__DIE__} = \&Apache2::ServerRec::die);
 >
 >
205a211
 > sub extractScriptUriPath();
373a380,386
 > # Prepend script's path uri to css url if css url is relative.
 > if ($cssurl) {
 >   unless($cssurl =~ m|^/|) {
 >     $cssurl = extractScriptUriPath() . "/$cssurl";
 >   }
 > }
 >
640a654,657
 >     # Prepend script's path uri to icon uri if icon uri is relative.
 >     unless($ipath =~ m|^/|) {
 >       $ipath = extractScriptUriPath() . "/$ipath";
 >     }
4426a4444,4455
 >
 >
 > #
 > # Extracts and returns the URI path of this script.
 > #
 > sub extractScriptUriPath() {
 >   my $s = $ENV{'SCRIPT_NAME'};
 >   $s =~ s|/[^/]+$||;
 >   return $s;
 > }
 >
 >



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442EF162.6090406>