Merge from knu-cvsweb 1.106.1.68.

2001-03-23  Akinori MUSHA  <knu@iDaemons.org>

	* cvsweb.cgi: Encode colons in file names properly.

	FreeBSD PR:	25963
	Submitted by:	Marc van Woerkom <3d@FreeBSD.org>

	* cvsweb.cgi: MFZ: 1.106.  Do closedir() properly.

2001-02-01  Akinori MUSHA  <knu@iDaemons.org>

	* cvsweb.cgi: Use a fixed-width font in the colored diff view.

	Requested by:	Julian Elischer <julian@elischer.org>

2001-01-29  Akinori MUSHA  <knu@iDaemons.org>

	* cvsweb.cgi: Remove an obsolete notice: CVSWEB_CONFIG is disused.
	One leftover substitution: "cvs" -> $CMD{cvs}
This commit is contained in:
Akinori MUSHA 2001-03-22 19:55:46 +00:00
parent 5de57831e6
commit 2b1e770324
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=9046
2 changed files with 19 additions and 16 deletions

View file

@ -42,9 +42,9 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
# $Id: cvsweb.cgi,v 1.68 2001-01-14 08:59:59 knu Exp $ # $Id: cvsweb.cgi,v 1.69 2001-03-22 19:55:43 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.64 2001/01/13 07:48:09 knu Exp $ # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.68 2001/03/22 19:46:59 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.67 2001/01/12 04:26:10 knu Exp $ # $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.68 2001/01/14 08:59:59 knu Exp $
# #
### ###
@ -140,9 +140,9 @@ sub forbidden_module($);
##### Start of Configuration Area ######## ##### Start of Configuration Area ########
delete $ENV{PATH}; delete $ENV{PATH};
$cvsweb_revision = join('.', '1.105', (split(/ /, $cvsweb_revision = '1.106' . '.' . (split(/ /,
q$Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.64 2001/01/13 07:48:09 knu Exp $ q$Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.68 2001/03/22 19:46:59 knu Exp $
))[2]); ))[2];
use File::Basename; use File::Basename;
@ -234,7 +234,7 @@ $LOG_REVSEPARATOR = q/^-{28}$/;
##### End of configuration variables ##### ##### End of configuration variables #####
$cgi_style::hsty_base = 'http://www.FreeBSD.org'; $cgi_style::hsty_base = 'http://www.FreeBSD.org';
$_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.67 2001/01/12 04:26:10 knu Exp $; $_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.68 2001/01/14 08:59:59 knu Exp $;
@_ = split; @_ = split;
$cgi_style::hsty_date = "@_[3,4]"; $cgi_style::hsty_date = "@_[3,4]";
@ -323,9 +323,7 @@ if (-f $config) {
} else { } else {
&fatal("500 Internal Error", &fatal("500 Internal Error",
'Configuration not found. Set the variable <code>$config</code> ' 'Configuration not found. Set the variable <code>$config</code> '
. 'in cvsweb.cgi, or the environment variable ' . 'in cvsweb.cgi to your <b>cvsweb.conf</b> configuration file first.');
. '<code>CVSWEB_CONFIG</code>, to your <b>cvsweb.conf</b> '
. 'configuration file first.');
} }
undef %input; undef %input;
@ -1242,6 +1240,8 @@ sub spacedHtmlText($;$) {
sub link($$) { sub link($$) {
my($name, $url) = @_; my($name, $url) = @_;
$url =~ s/:/sprintf("%%%02x", ord($&))/eg;
sprintf '<A HREF="%s">%s</A>', hrefquote($url), $name; sprintf '<A HREF="%s">%s</A>', hrefquote($url), $name;
} }
@ -1319,6 +1319,7 @@ sub safeglob($) {
push(@results, "$dirname/" .$_); push(@results, "$dirname/" .$_);
} }
} }
closedir($dh);
} }
@results; @results;
@ -1427,7 +1428,7 @@ sub doAnnotate($$) {
# the public domain. # the public domain.
# we could abandon the use of rlog, rcsdiff and co using # we could abandon the use of rlog, rcsdiff and co using
# the cvsserver in a similiar way one day (..after rewrite) # the cvsserver in a similiar way one day (..after rewrite)
$pid = open2($reader, $writer, "cvs", @cvs_options, "server") $pid = open2($reader, $writer, $CMD{cvs}, @cvs_options, "server")
|| fatal ("500 Internal Error", "Fatal Error - unable to open cvs for annotation"); || fatal ("500 Internal Error", "Fatal Error - unable to open cvs for annotation");
# OK, first send the request to the server. A simplified example is: # OK, first send the request to the server. A simplified example is:
@ -2654,8 +2655,8 @@ sub human_readable_diff($){
print "<br>Tag: $sym2\n" if ($sym1); print "<br>Tag: $sym2\n" if ($sym1);
print "</th>\n"; print "</th>\n";
my $fs = "<font face=\"$difffontface\" size=\"$difffontsize\">"; my $fs = "<font face=\"$difffontface\" size=\"$difffontsize\"><tt>";
my $fe = "</font>"; my $fe = "</tt></font>";
my $leftRow = 0; my $leftRow = 0;
my $rightRow = 0; my $rightRow = 0;
@ -2995,6 +2996,8 @@ sub download_url($$;$) {
$url .= "?rev=$revision"; $url .= "?rev=$revision";
$url .= '&content-type=' . urlencode($mimetype) if (defined($mimetype)); $url .= '&content-type=' . urlencode($mimetype) if (defined($mimetype));
$url =~ s/:/sprintf("%%%02x", ord($&))/eg;
$url; $url;
} }

View file

@ -6,9 +6,9 @@
# 1999 H. Nordstrom <hno@hem.passagen.se> # 1999 H. Nordstrom <hno@hem.passagen.se>
# 2000-2001 A. MUSHA <knu@FreeBSD.org> # 2000-2001 A. MUSHA <knu@FreeBSD.org>
# based on work by Bill Fenner <fenner@FreeBSD.org> # based on work by Bill Fenner <fenner@FreeBSD.org>
# $Id: cvsweb.conf,v 1.17 2001-01-14 09:03:25 knu Exp $ # $Id: cvsweb.conf,v 1.18 2001-03-22 19:55:46 knu Exp $
# $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 1.22 2001/01/13 07:48:09 knu Exp $ # $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 1.23 2001/01/14 09:04:04 knu Exp $
# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.16 2001/01/14 08:59:59 knu Exp $ # $FreeBSD: www/en/cgi/cvsweb.conf,v 1.17 2001/01/14 09:03:25 knu Exp $
# #
### ###