version 4.2, 2019/11/09 09:10:05 |
version 4.8, 2019/11/09 09:41:07 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl |
# $Id$ |
# $Id$ |
# $knu: cvsweb.cgi,v 1.299 2010/11/13 16:37:18 simon |
# $knu: cvsweb.cgi,v 1.299 2010/11/13 16:37:18 simon |
# |
# |
|
|
require 5.006; |
require 5.006; |
|
|
use strict; |
use strict; |
|
|
use warnings; |
use warnings; |
use filetest qw(access); |
use filetest qw(access); |
|
|
|
|
); |
); |
|
|
use Cwd qw(abs_path); |
use Cwd qw(abs_path); |
use File::Basename qw(dirname); |
|
use File::Path qw(rmtree); |
use File::Path qw(rmtree); |
use File::Spec::Functions qw(canonpath catdir catfile curdir devnull rootdir |
use File::Spec::Functions qw(canonpath catdir catfile curdir devnull rootdir |
tmpdir updir); |
tmpdir updir); |
Line 115 use constant HAS_EDIFF => eval { require String::Ed |
|
Line 113 use constant HAS_EDIFF => eval { require String::Ed |
|
|
|
BEGIN |
BEGIN |
{ |
{ |
$VERSION = '3.0.6'; |
$VERSION = '3.1'; |
|
|
$HTML_DOCTYPE = |
$HTML_DOCTYPE = |
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' . |
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' . |
Line 204 sub checkout_to_temp($$$); |
|
Line 202 sub checkout_to_temp($$$); |
|
# (think mod_perl)... |
# (think mod_perl)... |
delete(@ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}); |
delete(@ENV{qw(PATH IFS CDPATH ENV BASH_ENV)}); |
|
|
my ($mydir) = (dirname($0) =~ /(.*)/); # untaint |
# Location of the configuration file inside the web server chroot: |
|
$config = '/conf/cvsweb/cvsweb.conf'; |
|
|
##### Start of Configuration Area ######## |
|
|
|
# == EDIT this == |
|
# Locations to search for user configuration, in order: |
|
for (catfile($mydir, 'cvsweb.conf'), '/usr/local/etc/cvsweb/cvsweb.conf') { |
|
if (-r $_) { |
|
$config = $_; |
|
last; |
|
} |
|
} |
|
|
|
##### End of Configuration Area ######## |
|
|
|
undef $mydir; |
|
|
|
######## Configuration parameters ######### |
######## Configuration parameters ######### |
|
|
@CVSrepositories = @CVSROOT = %CVSROOT = %MIRRORS = %DEFAULTVALUE = %ICONS = |
@CVSrepositories = @CVSROOT = %CVSROOT = %MIRRORS = %DEFAULTVALUE = %ICONS = |
Line 1556 sub htmlify($;$) |
|
Line 1540 sub htmlify($;$) |
|
}{ |
}{ |
my($text, $name, $section) = ($1, $2, defined($3) ? $3 : $4); |
my($text, $name, $section) = ($1, $2, defined($3) ? $3 : $4); |
($name =~ /[A-Za-z]/ && $name !~ /\.(:|$)/) |
($name =~ /[A-Za-z]/ && $name !~ /\.(:|$)/) |
? &link($text, sprintf($mancgi, $section, uri_escape($name))) |
? &link($text, sprintf($mancgi, uri_escape($name), $section)) |
: $text; |
: $text; |
}egx; |
}egx; |
} $_; |
} $_; |
Line 2934 sub printLog($$$;$$) |
|
Line 2918 sub printLog($$$;$$) |
|
print "<br />\n"; |
print "<br />\n"; |
|
|
print '<i>'; |
print '<i>'; |
if (defined @mytz) { |
if (@mytz) { |
my ($est) = $mytz[(localtime($date{$_}))[8]]; |
my ($est) = $mytz[(localtime($date{$_}))[8]]; |
print scalar localtime($date{$_}), " $est</i> ("; |
print scalar localtime($date{$_}), " $est</i> ("; |
} else { |
} else { |
Line 4210 sub htmlquote($) |
|
Line 4194 sub htmlquote($) |
|
# Special Characters; RFC 1866 |
# Special Characters; RFC 1866 |
s/&/&/g; |
s/&/&/g; |
s/\"/"/g; |
s/\"/"/g; |
|
s/"/"/g; |
s/</</g; |
s/</</g; |
s/>/>/g; |
s/>/>/g; |
return $_; |
return $_; |