Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
3321a215
Commit
3321a215
authored
Apr 26, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 140124 - PuntTryAgain must die. Patch by gerv, 2xr=myk.
parent
b236802c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
22 deletions
+9
-22
CGI.pl
CGI.pl
+5
-18
post_bug.cgi
post_bug.cgi
+4
-4
No files found.
CGI.pl
View file @
3321a215
...
...
@@ -228,14 +228,11 @@ sub CheckFormField (\%$;\@) {
SendSQL
(
"SELECT description FROM fielddefs WHERE name="
.
SqlQuote
(
$fieldname
));
my
$result
=
FetchOneColumn
();
if
(
$result
)
{
PuntTryAgain
(
"A legal $result was not set.
"
);
ThrowCodeError
(
"A legal $result was not set."
,
undef
,
"abort
"
);
}
else
{
PuntTryAgain
(
"A legal $fieldname was not set."
);
print
Param
(
"browserbugmessage"
);
ThrowCodeError
(
"A legal $fieldname was not set."
,
undef
,
"abort"
);
}
PutFooter
();
exit
0
;
}
}
...
...
@@ -965,9 +962,11 @@ sub DisplayError {
# For "this shouldn't happen"-type places in the code.
# $vars->{'variables'} is a reference to a hash of useful debugging info.
sub
ThrowCodeError
{
(
$vars
->
{
'error'
},
$vars
->
{
'variables'
})
=
(
@_
);
(
$vars
->
{
'error'
},
$vars
->
{
'variables'
}
,
my
$unlock_tables
)
=
(
@_
);
$vars
->
{
'title'
}
=
"Code Error"
;
SendSQL
(
"UNLOCK TABLES"
)
if
$unlock_tables
;
# We may optionally log something to file here.
print
"Content-type: text/html\n\n"
if
!
$vars
->
{
'header_done'
};
...
...
@@ -1016,18 +1015,6 @@ END
exit
;
}
# PuntTryAgain is deprecated. Use UserError with the unlock_tables parameter.
sub
PuntTryAgain
($)
{
(
$vars
->
{
'error'
})
=
(
@_
);
SendSQL
(
"UNLOCK TABLES"
);
$vars
->
{
'header_done'
}
=
"true"
;
$template
->
process
(
"global/user-error.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
sub
CheckIfVotedConfirmed
{
my
(
$id
,
$who
)
=
(
@_
);
SendSQL
(
"SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, "
.
...
...
post_bug.cgi
View file @
3321a215
...
...
@@ -220,15 +220,15 @@ foreach my $b (grep(/^bit-\d*$/, keys %::FORM)) {
if
(
$::FORM
{
$b
})
{
my
$v
=
substr
(
$b
,
4
);
$v
=~
/^(\d+)$/
||
PuntTryAgain
(
"One of the group bits submitted was invalid."
);
||
ThrowCodeError
(
"One of the group bits submitted was invalid."
,
undef
,
"abort"
);
if
(
!
GroupIsActive
(
$v
))
{
# Prevent the user from adding the bug to an inactive group.
# Should only happen if there is a bug in Bugzilla or the user
# hacked the "enter bug" form since otherwise the UI
# for adding the bug to the group won't appear on that form.
PuntTryAgain
(
"You can't add this bug to the inactive group "
.
"identified by the bit '$v'. This shouldn't happen, "
.
"so it may indicate a bug in Bugzilla."
);
ThrowCodeError
(
"Attempted to add bug to an inactive group, "
.
"identified by the bit '$v'."
,
undef
,
"abort"
);
}
$sql
.=
" + $v"
;
# Carefully written so that the math is
# done by MySQL, which can handle 64-bit math,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment