=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -p -r1.1.1.3 -r1.1.1.4 --- cvsweb/cvsweb.cgi 2000/08/25 09:13:40 1.1.1.3 +++ cvsweb/cvsweb.cgi 2000/09/03 18:41:30 1.1.1.4 @@ -42,7 +42,7 @@ # SUCH DAMAGE. # # $zId: cvsweb.cgi,v 1.94 2000/08/24 06:41:22 hnordstrom Exp $ -# $kId: cvsweb.cgi,v 1.15 2000/08/25 09:01:58 knu Exp $ +# $kId: cvsweb.cgi,v 1.17 2000/09/03 18:25:47 knu Exp $ # ### @@ -53,8 +53,8 @@ use vars qw ( %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES %alltags @tabcolors %fileinfo %tags @branchnames %nameprinted %symrev %revsym @allrevisions %date %author @revdisplayorder - @revisions %state %difflines %log %branchpoint @revorder $prcgi - @prcategories $prcategories + @revisions %state %difflines %log %branchpoint @revorder + $prcgi @prcategories $prcategories $mancgi $checkoutMagic $doCheckout $scriptname $scriptwhere $where $pathinfo $Browser $nofilelinks $maycompress @stickyvars %funcline_regexp $is_mod_perl @@ -347,6 +347,7 @@ foreach my $k (keys %ICONS) { do "$config-$cvstree" if (-f "$config-$cvstree"); $prcategories = '(?:' . join('|', @prcategories) . ')'; +$prcgi .= '%s' if defined($prcgi) && $prcgi !~ /%s/; $fullname = $cvsroot . '/' . $where; $mimetype = &getMimeTypeFromSuffix ($fullname); @@ -886,7 +887,7 @@ sub findLastModifiedSubdirs(@) { } sub htmlify($;$) { - my($string, $pr) = @_; + my($string, $extra) = @_; # Special Characters; RFC 1866 $string =~ s/&/&/g; @@ -895,14 +896,21 @@ sub htmlify($;$) { $string =~ s/>/>/g; # get URL's as link .. - $string =~ s`(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*`$1$2$3`; + $string =~ s`(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*`$1$2$3`g; # get e-mails as link - $string =~ s`([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})`$1`; + $string =~ s`([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})`$1`g; - # get #PR as link .. - if ($pr && defined($prcgi)) { - 1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`$1$2`i; - $string =~ s`\b${prcategories}/(\d+)\b`$&`igo; + if ($extra) { + # get PR #'s as link .. + if (defined($prcgi)) { + 1 while $string =~ s`\b(pr[:#]?\s*(?:#?\d+[,\s]\s*)*#?)(\d+)\b`sprintf('%s%s', $1, sprintf($prcgi, $2), $2)`ie; + $string =~ s`\b${prcategories}/(\d+)\b`sprintf('%s', sprintf($prcgi, $1), $&)`igeo; + } + + # get manpage specs as link .. + if (defined($mancgi)) { + $string =~ s`\b([a-zA-Z]\w+)\(([0-9n])\)\B`sprintf('%s', sprintf($mancgi, $2, $1), $&)`ge; + } } return $string; @@ -2382,7 +2390,7 @@ sub navigateHeader($$$$$) { $swhere = urlencode($filename) if ($swhere eq ""); print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; print "\n\n"; - print ''; + print ''; print "\n$path$filename - $title - $rev\n"; print "\n"; print ""; @@ -2734,7 +2742,7 @@ sub http_header(;$) { sub html_header($) { my ($title) = @_; - my $version = '$zRevision: 1.94 $ $kRevision: 1.15 $'; #' + my $version = '$zRevision: 1.94 $ $kRevision: 1.17 $'; #' http_header(); print <