Patch to make cvsweb.cgi work with relative icon and css paths

Craig Manley cmanley at xs4all.nl
Sat Apr 1 21:32:16 UTC 2006


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;
 > }
 >
 >


More information about the freebsd-cvsweb mailing list