Add -T <tag> option, which results in --text=\[tag\].
Put $hr assignment back, since $hr is still used, particularly in text mode output.
This commit is contained in:
parent
8180b6b7cb
commit
546a802f81
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=26363
1 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/perl -T
|
||||
# $FreeBSD: www/en/cgi/query-pr-summary.cgi,v 1.51 2005/09/13 18:17:46 remko Exp $
|
||||
# $FreeBSD: www/en/cgi/query-pr-summary.cgi,v 1.52 2005/10/19 15:47:38 fenner Exp $
|
||||
|
||||
sub escape($) { $_ = $_[0]; s/&/&/g; s/</</g; s/>/>/g; $_; }
|
||||
|
||||
|
@ -31,7 +31,7 @@ if ($html_mode) {
|
|||
&ReadParse(*input) if $html_mode;
|
||||
|
||||
} else {
|
||||
&Getopts('CcqRr:s:');
|
||||
&Getopts('CcqRr:s:T:');
|
||||
|
||||
$input{'responsible'} = 'summary' if $opt_R;
|
||||
if ($opt_r) {
|
||||
|
@ -48,6 +48,11 @@ if ($html_mode) {
|
|||
} elsif (!$opt_c) {
|
||||
$query_args = '--restricted ';
|
||||
}
|
||||
if ($opt_T) {
|
||||
($tag) = ($opt_T =~ m/^(\^?[-_a-zA-Z0-9@.]*\$?)$/);
|
||||
die 'Insecure args' if ($tag ne $opt_T);
|
||||
$input{'text'} = '\[' . $tag . '\]';
|
||||
}
|
||||
}
|
||||
|
||||
$closed_too = 1 if $input{'state'} eq 'closed' || $input{'closedtoo'};
|
||||
|
@ -65,6 +70,7 @@ if ($html_mode) {
|
|||
$pr = '<pre>'; $pr_e = '</pre>';
|
||||
$h1 = '<h1>'; $h1_e = '</h1>';
|
||||
$h3 = '<h3>'; $h3_e = '</h3>';
|
||||
$hr = '<hr/>';
|
||||
|
||||
$table = "<table width='100%' border='0' cellspacing='1' cellpadding='0'>";
|
||||
$table_e = '</table>';
|
||||
|
@ -91,6 +97,8 @@ if ($html_mode) {
|
|||
$pr = ''; $pr_e = '';
|
||||
$h1 = ''; $h1_e = '';
|
||||
$h3 = ''; $h3_e = '';
|
||||
$hr = "\n----------------------------------------" .
|
||||
"---------------------------------------\n";
|
||||
|
||||
$table = '';
|
||||
$table_e = '';
|
||||
|
|
Loading…
Reference in a new issue