View | Details | Raw Unified | Return to bug 82379
Collapse All | Expand All

(-)query-pr.cgi (-11 / +12 lines)
Lines 27-35 Link Here
27
	($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|;
27
	($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|;
28
	$scriptname =~ s|/$||;
28
	$scriptname =~ s|/$||;
29
	($summary = $scriptname) =~ s/query-pr/query-pr-summary/;
29
	($summary = $scriptname) =~ s/query-pr/query-pr-summary/;
30
	print "<FORM METHOD=GET ACTION=\"$scriptname\">\n";
30
	print "<form method='get' action='$scriptname'>\n";
31
	print "<INPUT TYPE=TEXT NAME=pr></FORM>\n";
31
	print "<input type='text' name='pr' /><br />\n";
32
	print "<p>See also the <A HREF=\"$summary\">PR summary</A></p>\n";
32
	print "<input type='submit' value='Query' />\n</form>\n";
33
	print "<p>See also the <a href='$summary'>PR summary</a></p>\n";
33
	print &html_footer;
34
	print &html_footer;
34
	exit 0;
35
	exit 0;
35
    }
36
    }
Lines 85-93 Link Here
85
	print &html_header("FreeBSD problem report");
86
	print &html_header("FreeBSD problem report");
86
	if ($_ !~ /^query-pr(:?\.(:?real|web))?: no PRs matched$/) {
87
	if ($_ !~ /^query-pr(:?\.(:?real|web))?: no PRs matched$/) {
87
	    print "<P>query-pr said:\n";
88
	    print "<P>query-pr said:\n";
88
	    print "<PRE>$_\n";
89
	    print "<pre>$_\n";
89
	    print <Q>;
90
	    print <Q>;
90
	    print "</PRE>\n";
91
	    print "</pre>\n";
91
	} else {
92
	} else {
92
	    print "<p>No PR found matching $pr\n";
93
	    print "<p>No PR found matching $pr\n";
93
	}
94
	}
Lines 96-102 Link Here
96
    } elsif (/^lockf: /) {
97
    } elsif (/^lockf: /) {
97
	print &html_header("FreeBSD problem report");
98
	print &html_header("FreeBSD problem report");
98
	print "<p>The PR database is currently busy; please try ",
99
	print "<p>The PR database is currently busy; please try ",
99
	    "<A HREF=\"./query-pr.cgi?pr=$pr\">your query</A> again.";
100
	    "<a href='./query-pr.cgi?pr=$pr'>your query</a> again.";
100
	print &html_footer;
101
	print &html_footer;
101
	exit;
102
	exit;
102
    }
103
    }
Lines 142-148 Link Here
142
	$origsyn = $syn;
143
	$origsyn = $syn;
143
	$syn = &fixline($syn);
144
	$syn = &fixline($syn);
144
	print &short_html_header("Problem Report $cat/$number: $syn");
145
	print &short_html_header("Problem Report $cat/$number: $syn");
145
	print "<h1><font color=\"#660000\">Problem Report $cat/$number</font></h1>\n";
146
	print "<h1><font color='#660000'>Problem Report $cat/$number</font></h1>\n";
146
	print "<strong>$syn</strong><p>\n<dl>\n";
147
	print "<strong>$syn</strong><p>\n<dl>\n";
147
    } else {
148
    } else {
148
	next if $inhdr;
149
	next if $inhdr;
Lines 156-162 Link Here
156
		$trailer .= $2;
157
		$trailer .= $2;
157
	    }
158
	    }
158
	    if ($1 eq "Originator" && $from ne "") {	# add email address
159
	    if ($1 eq "Originator" && $from ne "") {	# add email address
159
		$trailer .= " &lt;<A HREF=\"mailto:$email\">" . &fixline($from) . "</A>&gt;";
160
		$trailer .= " &lt;<a href='mailto:$email'>" . &fixline($from) . "</a>&gt;";
160
	    }
161
	    }
161
	    $blank = !($2);
162
	    $blank = !($2);
162
	    $multiline = 0;
163
	    $multiline = 0;
Lines 180-186 Link Here
180
$origsyn =~ s/[^a-zA-Z+.@-]/"%" . sprintf("%02X", unpack("C", $&))/eg;
181
$origsyn =~ s/[^a-zA-Z+.@-]/"%" . sprintf("%02X", unpack("C", $&))/eg;
181
$email =~ s/[^a-zA-Z+.@-]/"%" . sprintf("%02X", unpack("C", $&))/eg;
182
$email =~ s/[^a-zA-Z+.@-]/"%" . sprintf("%02X", unpack("C", $&))/eg;
182
183
183
print qq`<A HREF="mailto:bug-followup\@FreeBSD.org,${email}?subject=Re:%20${cat}/${number}:%20$origsyn">Submit Followup</A> | <A HREF="./query-pr.cgi?pr=$pr&amp;f=raw">Raw PR</A>\n`;
184
print qq`<a href="mailto:bug-followup\@FreeBSD.org,${email}?subject=Re:%20${cat}/${number}:%20$origsyn">Submit Followup</a> | <a href="./query-pr.cgi?pr=$pr&amp;f=raw">Raw PR</a>\n`;
184
185
185
print &html_footer;
186
print &html_footer;
186
187
Lines 228-239 Link Here
228
	    local($href) = local($html) = $_;
229
	    local($href) = local($html) = $_;
229
	    $href =~ s/&/%26/g;
230
	    $href =~ s/&/%26/g;
230
	    $html =~ s/&/&amp;/g;
231
	    $html =~ s/&/&amp;/g;
231
	    $_ = "<A HREF=\"$href\">$html</A>";
232
	    $_ = "<a href='$href'>$html</a>";
232
	} else {
233
	} else {
233
	    s/&/&amp;/g;
234
	    s/&/&amp;/g;
234
	    s/</&lt;/g;
235
	    s/</&lt;/g;
235
	    s/>/&gt;/g;
236
	    s/>/&gt;/g;
236
	    s%(\WPR[:s# \t]+)([a-z3486]+\/)?([0-9]+)%$1<A HREF="query-pr.cgi?pr=$3">$2$3</A>%ig;
237
	    s%(\WPR[:s# \t]+)([a-z3486]+\/)?([0-9]+)%$1<a href="query-pr.cgi?pr=$3">$2$3</a>%ig;
237
	}
238
	}
238
	$isurl = ! $isurl;
239
	$isurl = ! $isurl;
239
    }
240
    }

Return to bug 82379