diff options
author | travis%sedsystems.ca <> | 2005-02-09 01:22:25 +0100 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-02-09 01:22:25 +0100 |
commit | c0df359943e8b746f02f5c43d25e5ffea99f8d19 (patch) | |
tree | c6245cd227c142f81d5c136576af06189d132a32 /process_bug.cgi | |
parent | d286752d0525b9bf8e6617b332aa8b3638212fc3 (diff) | |
download | bugzilla-c0df359943e8b746f02f5c43d25e5ffea99f8d19.tar.gz bugzilla-c0df359943e8b746f02f5c43d25e5ffea99f8d19.tar.xz |
Bug 276838 : Eliminate use of $::unconfirmedstate
Patch by Max Kanat-Alexander <mkanat@kerio.com> r=wurblzap a=justdave
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index c560e90ff..a04fe62b2 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -411,7 +411,7 @@ sub CheckCanChangeField { # *Only* users with "canconfirm" privs can confirm bugs. if ($field eq "canconfirm" || ($field eq "bug_status" - && $oldvalue eq $::unconfirmedstate + && $oldvalue eq 'UNCONFIRMED' && IsOpenedState($newvalue))) { $PrivilegesRequired = 3; @@ -587,8 +587,7 @@ sub ChangeStatus { # When reopening, we need to check whether the bug was ever # confirmed or not $::query .= "bug_status = CASE WHEN everconfirmed = 1 THEN " . - SqlQuote($str) . " ELSE " . - SqlQuote($::unconfirmedstate) . " END"; + SqlQuote($str) . " ELSE 'UNCONFIRMED' END"; } elsif (IsOpenedState($str)) { # Note that we cannot combine this with the above branch - here we # need to check if bugs.bug_status is open, (since we don't want to @@ -620,7 +619,7 @@ sub ChangeStatus { $::query .= "bug_status = CASE WHEN bug_status IN($open_state) THEN " . "(CASE WHEN everconfirmed = 1 THEN " . SqlQuote($str) . " ELSE " . - SqlQuote($::unconfirmedstate) . " END) ELSE " . + " 'UNCONFIRMED' END) ELSE " . "bug_status END"; } else { $::query .= "bug_status = " . SqlQuote($str); @@ -1188,7 +1187,7 @@ foreach my $id (@idlist) { || $::FORM{'knob'} eq 'reassign') { $formhash{'assigned_to'} = $assignee; - if ($oldhash{'bug_status'} eq $::unconfirmedstate) { + if ($oldhash{'bug_status'} eq 'UNCONFIRMED') { $formhash{'bug_status'} = $oldhash{'bug_status'}; } } |