summaryrefslogtreecommitdiffstats
path: root/editflagtypes.cgi
diff options
context:
space:
mode:
authorjouni%heikniemi.net <>2004-07-06 16:08:02 +0200
committerjouni%heikniemi.net <>2004-07-06 16:08:02 +0200
commit6c0b6e11bf1e302320bebe0ce9545eff924ab124 (patch)
treeec6538b7ffb236cd3c092d5942c89343daa0f171 /editflagtypes.cgi
parent73fd49ff3bbff6244802ba548bb22c2be39014e1 (diff)
downloadbugzilla-6c0b6e11bf1e302320bebe0ce9545eff924ab124.tar.gz
bugzilla-6c0b6e11bf1e302320bebe0ce9545eff924ab124.tar.xz
Bug 223878: Flag system dies when changing a deleted flag.
r=joel, justdave a=justdave
Diffstat (limited to 'editflagtypes.cgi')
-rwxr-xr-xeditflagtypes.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi
index 5fcabd73f..bb1b86ec0 100755
--- a/editflagtypes.cgi
+++ b/editflagtypes.cgi
@@ -308,6 +308,7 @@ sub update {
AND (bugs.component_id = i.component_id OR i.component_id IS NULL))
WHERE flags.type_id = $::FORM{'id'}
AND flags.bug_id = bugs.bug_id
+ AND flags.is_active = 1
AND i.type_id IS NULL
");
Bugzilla::Flag::clear(FetchOneColumn()) while MoreSQLData();
@@ -318,6 +319,7 @@ sub update {
WHERE flags.type_id = $::FORM{'id'}
AND flags.bug_id = bugs.bug_id
AND flags.type_id = e.type_id
+ AND flags.is_active = 1
AND (bugs.product_id = e.product_id OR e.product_id IS NULL)
AND (bugs.component_id = e.component_id OR e.component_id IS NULL)
");
@@ -340,7 +342,8 @@ sub confirmDelete
validateID();
# check if we need confirmation to delete:
- my $count = Bugzilla::Flag::count({ 'type_id' => $::FORM{'id'} });
+ my $count = Bugzilla::Flag::count({ 'type_id' => $::FORM{'id'},
+ 'is_active' => 1 });
if ($count > 0) {
$vars->{'flag_type'} = Bugzilla::FlagType::get($::FORM{'id'});