From 7ba234363ead197d28d7db9a5338a801abd65fec Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Wed, 3 Jan 2001 07:40:09 +0000 Subject: [PATCH] Grr... Pass me a pointy hat. Fix bogus flaw in merger and the @INC problem under -T option. --- en/cgi/cvsweb.cgi | 20 +++++++++++--------- en/cgi/cvsweb.conf | 8 +++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/en/cgi/cvsweb.cgi b/en/cgi/cvsweb.cgi index 7de0a56aa2..844224c95f 100755 --- a/en/cgi/cvsweb.cgi +++ b/en/cgi/cvsweb.cgi @@ -43,8 +43,8 @@ # SUCH DAMAGE. # # $zId: cvsweb.cgi,v 1.104 2000/11/01 22:05:12 hnordstrom Exp $ -# $Id: cvsweb.cgi,v 1.65 2001-01-03 03:46:29 knu Exp $ -# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.64 2001/01/02 12:45:29 knu Exp $ +# $Id: cvsweb.cgi,v 1.66 2001-01-03 07:40:09 knu Exp $ +# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.65 2001/01/03 03:46:29 knu Exp $ # ### @@ -53,7 +53,7 @@ require 5.000; use strict; use vars qw ( - $config $allow_version_select $verbose + $mydir $config $allow_version_select $verbose @CVSrepositories @CVSROOT %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES @DIFFTYPES %DIFFTYPES @LOGSORTKEYS %LOGSORTKEYS @@ -136,14 +136,16 @@ sub forbidden_module($); ##### Start of Configuration Area ######## use File::Basename; +($mydir) = (dirname($0) =~ /(.*)/); # untaint + # == EDIT this == # Locations to search for user configuration, in order: for ( - (dirname $0) . '/cvsweb.conf', + "$mydir/cvsweb.conf", '/usr/local/etc/cvsweb/cvsweb.conf' ) { if (defined($_) && -r $_) { - ($config) = /(.*)/; # untaint + $config = $_; last; } } @@ -222,7 +224,7 @@ $LOG_REVSEPARATOR = q/^-{28}$/; ##### End of configuration variables ##### $cgi_style::hsty_base = 'http://www.FreeBSD.org'; -$_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.64 2001/01/02 12:45:29 knu Exp $; +$_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.65 2001/01/03 03:46:29 knu Exp $; @_ = split; $cgi_style::hsty_date = "@_[3,4]"; @@ -230,7 +232,7 @@ $cgi_style::hsty_date = "@_[3,4]"; 0 if $cgi_style::hsty_base ne $cgi_style::hsty_date; package cgi_style; -require 'cgi-style.pl'; +require "$main::mydir/cgi-style.pl"; package main; ##### End of configuration variables ##### @@ -2752,7 +2754,7 @@ sub navigateHeader($$$$$) { print qq``; print "\n\n"; print qq`\n`; - print ''; + print ''; print "\n$path$filename - $title - $rev\n"; print "$body_tag_for_src\n"; print ""; @@ -3147,7 +3149,7 @@ sub http_header(;$) { sub html_header($) { my ($title) = @_; - my $version = '$zRevision: 1.104 $ $Revision: 1.65 $'; #' + my $version = '$zRevision: 1.104 $ $Revision: 1.66 $'; #' http_header(defined($charset) ? "text/html; charset=$charset" : "text/html"); (my $header = &cgi_style::html_header) =~ s/^.*\n\n//; # remove HTTP response header diff --git a/en/cgi/cvsweb.conf b/en/cgi/cvsweb.conf index 02398ff954..c8aa34df3e 100644 --- a/en/cgi/cvsweb.conf +++ b/en/cgi/cvsweb.conf @@ -7,8 +7,8 @@ # 2000 A. MUSHA # based on work by Bill Fenner # $zId: cvsweb.conf,v 1.27 2000/07/27 10:16:39 kcoar Exp $ -# $Id: cvsweb.conf,v 1.13 2001-01-03 03:46:29 knu Exp $ -# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.12 2001/01/02 12:45:29 knu Exp $ +# $Id: cvsweb.conf,v 1.14 2001-01-03 07:40:09 knu Exp $ +# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.13 2001/01/03 03:46:29 knu Exp $ # ### @@ -36,7 +36,7 @@ # This tree is enabled by default when # you enter the page -$cvstreedefault = 'freebsd'; +$cvstreedefault = $CVSrepositories[2 * 0]; # The first one ############## # Mirror Sites @@ -49,8 +49,6 @@ $cvstreedefault = 'freebsd'; 'USA, California' => 'http://www.FreeBSD.org/cgi/cvsweb.cgi', 'Japan' => 'http://www.jp.FreeBSD.org/cgi/cvsweb.cgi', ); -======= -$cvstreedefault = $CVSrepositories[2 * 0]; # The first one ############## # Bug tracking system options