version 1.1.1.1, 2000/08/14 04:35:13 |
version 3.5, 2000/07/28 19:38:26 |
|
|
#!/usr/bin/perl5 -ws |
#!/usr/bin/perl -ws |
# |
# |
# cvsweb - a CGI interface to CVS trees. |
# cvsweb - a CGI interface to CVS trees. |
# |
# |
|
|
# 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. |
# |
# |
# $zId: cvsweb.cgi,v 1.93 2000/07/27 17:42:28 hzeller Exp $ |
# $Id$ |
# $kId: cvsweb.cgi,v 1.11 2000/08/13 18:58:24 knu Exp $ |
|
# |
# |
### |
### |
|
|
|
|
); |
); |
|
|
##### Start of Configuration Area ######## |
##### Start of Configuration Area ######## |
use Cwd; |
|
|
|
# == EDIT this == |
# == EDIT this == |
# User configuration is stored in |
# User configuration is stored in |
$config = undef; |
$config = defined($ENV{CVSWEB_CONFIG}) ? $ENV{CVSWEB_CONFIG} : '/usr/local/etc/cvsweb.conf'; |
|
|
for ($ENV{CVSWEB_CONFIG}, '/usr/local/etc/cvsweb.conf', getcwd . '/cvsweb.conf') { |
|
$config = $_ if -r $_; |
|
} |
|
|
|
# == Configuration defaults == |
# == Configuration defaults == |
# Defaults for configuration variables that shouldn't need |
# Defaults for configuration variables that shouldn't need |
# to be configured.. |
# to be configured.. |
Line 168 $maycompress =(($ENV{HTTP_ACCEPT_ENCODING} =~ m`gzip` |
|
Line 161 $maycompress =(($ENV{HTTP_ACCEPT_ENCODING} =~ m`gzip` |
|
# to hold our state - they will be added (with |
# to hold our state - they will be added (with |
# their current value) to any link/query string |
# their current value) to any link/query string |
# you construct |
# you construct |
@stickyvars = qw(cvsroot hideattic sortby logsort f only_with_tag); |
@stickyvars = qw(cvsroot hideattic sortby logsort fonly_with_tag); |
|
|
if (-f $config) { |
if (-f $config) { |
do $config; |
do $config; |
|
|
|
|
# get #PR as link .. |
# get #PR as link .. |
if ($pr && defined($prcgi)) { |
if ($pr && defined($prcgi)) { |
1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1<A HREF="$prcgi$2">$2</A>`i; |
1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1<A HREF="$prcgi?pr=$2">$2</A>`i; |
$string =~ s`\b${prcategories}/(\d+)\b`<A HREF="$prcgi$1">$&</A>`igo; |
$string =~ s`\b${prcategories}/(\d+)\b`<A HREF="$prcgi?pr=$1">$&</A>`igo; |
} |
} |
|
|
return $string; |
return $string; |
Line 1479 sub getDirLogs { |
|
Line 1472 sub getDirLogs { |
|
if ($tag) { |
if ($tag) { |
#can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog.. |
#can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog.. |
if (! open($fh, "-|")) { |
if (! open($fh, "-|")) { |
open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
close(STDERR); # rlog may complain; ignore. |
exec('rlog', @files); |
exec("rlog",@files); |
} |
} |
} |
} |
else { |
else { |
my $kidpid = open($fh, "-|"); |
my $kidpid = open($fh, "-|"); |
if (! $kidpid) { |
if (! $kidpid) { |
open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
exec('rlog', '-r', @files); |
exec("rlog","-r",@files); |
} |
} |
} |
} |
$state = "start"; |
$state = "start"; |
Line 2336 sub navigateHeader ($$$$$) { |
|
Line 2329 sub navigateHeader ($$$$$) { |
|
$swhere = urlencode($filename) if ($swhere eq ""); |
$swhere = urlencode($filename) if ($swhere eq ""); |
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; |
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; |
print "<HTML>\n<HEAD>\n"; |
print "<HTML>\n<HEAD>\n"; |
print '<!-- CVSweb $zRevision: 1.93 $ $kRevision: 1.11 $ -->'; |
print '<!-- CVSweb $Revision$ -->'; |
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n"; |
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n"; |
print "<BODY BGCOLOR=\"$backcolor\">\n"; |
print "<BODY BGCOLOR=\"$backcolor\">\n"; |
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">"; |
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">"; |
Line 2690 sub http_header { |
|
Line 2683 sub http_header { |
|
|
|
sub html_header($) { |
sub html_header($) { |
my ($title) = @_; |
my ($title) = @_; |
my $version = '$zRevision: 1.93 $ $kRevision: 1.11 $'; |
my $version = '$Revision$'; |
http_header(); |
http_header(); |
print <<EOH; |
print <<EOH; |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" |