Catch patches attached via the web submission form (prior to the last update.)
This commit is contained in:
parent
b035d48107
commit
af21668f45
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=31370
1 changed files with 19 additions and 1 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
# 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.
|
||||||
#
|
#
|
||||||
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.62 2007/06/12 19:38:30 simon Exp $
|
# $FreeBSD: www/en/cgi/query-pr.cgi,v 1.63 2007/12/17 17:46:05 shaun Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -96,6 +96,8 @@ my (%header, %sfields, %mfields);
|
||||||
|
|
||||||
my $iscgi = defined $ENV{'SCRIPT_NAME'};
|
my $iscgi = defined $ENV{'SCRIPT_NAME'};
|
||||||
|
|
||||||
|
my $fromwebform = 0;
|
||||||
|
|
||||||
$ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin";
|
$ENV{'PATH'} = "/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin";
|
||||||
|
|
||||||
$ENV{'QUERY_STRING'} ||= "";
|
$ENV{'QUERY_STRING'} ||= "";
|
||||||
|
|
@ -400,6 +402,9 @@ foreach my $line (@query)
|
||||||
|
|
||||||
$getpatch = 0 if ($getpatch < 0);
|
$getpatch = 0 if ($getpatch < 0);
|
||||||
|
|
||||||
|
$fromwebform =
|
||||||
|
$header{'x-send-pr-version'} =~ /^www-/;
|
||||||
|
|
||||||
if ($getpatch > 0) {
|
if ($getpatch > 0) {
|
||||||
extractpatch();
|
extractpatch();
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -1009,6 +1014,19 @@ sub parsepatches
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/^Patch attached with submission follows:$/ && $fromwebform && !$inpatch) {
|
||||||
|
$patchnum++;
|
||||||
|
$inpatch |= PATCH_ANY;
|
||||||
|
return 1 if ($getpatch and $patchnum != $getpatch);
|
||||||
|
$lastcol = undef;
|
||||||
|
$lastrev = undef;
|
||||||
|
|
||||||
|
sprint('patchblock_thead', $patchnum, 'patch.txt', "txt")
|
||||||
|
unless ($getpatch);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (/^---{1,8}\s?([A-Za-z0-9-_.,:%]+) (begins|starts) here/i && !$inpatch) {
|
if (/^---{1,8}\s?([A-Za-z0-9-_.,:%]+) (begins|starts) here/i && !$inpatch) {
|
||||||
$patchnum++;
|
$patchnum++;
|
||||||
$inpatch |= PATCH_ANY;
|
$inpatch |= PATCH_ANY;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue