From c0df359943e8b746f02f5c43d25e5ffea99f8d19 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Wed, 9 Feb 2005 00:22:25 +0000 Subject: Bug 276838 : Eliminate use of $::unconfirmedstate Patch by Max Kanat-Alexander r=wurblzap a=justdave --- process_bug.cgi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'process_bug.cgi') 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'}; } } -- cgit v1.2.3-24-g4f1b