diff options
author | wurblzap%gmail.com <> | 2006-07-14 03:07:57 +0000 |
---|---|---|
committer | wurblzap%gmail.com <> | 2006-07-14 03:07:57 +0000 |
commit | f0c7611262b3948e72e8a18a036569a78f3b51f2 (patch) | |
tree | 54b0e146d4f8fd3c466002728261c895d7709034 /editgroups.cgi | |
parent | Bug 344298: importxml.pl performance problem - Patch by Vance Baarda <vrb@nov... (diff) | |
download | bugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.gz bugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.bz2 bugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.zip |
Bug 69000: Permit a stored query to be marked "shared" and accessible by other users.
Patch by Marc Schumann <wurblzap@gmail.com>,
r=vladd, a=myk
Diffstat (limited to 'editgroups.cgi')
-rwxr-xr-x | editgroups.cgi | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/editgroups.cgi b/editgroups.cgi index 39e78e9e6..57708cd3e 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -358,6 +358,12 @@ if ($action eq 'del') { WHERE group_id IN ($grouplist) AND isbless = 0 " . $dbh->sql_limit(1)) || 0; + my ($shared_queries) = + $dbh->selectrow_array('SELECT COUNT(*) + FROM namedquery_group_map + WHERE group_id = ?', + undef, $gid); + my $bug_ids = $dbh->selectcol_arrayref('SELECT bug_id FROM bug_group_map WHERE group_id = ?', undef, $gid); @@ -372,14 +378,15 @@ if ($action eq 'del') { $dbh->sql_limit(1), undef, ($gid, $gid)) || 0; - $vars->{'gid'} = $gid; - $vars->{'name'} = $name; - $vars->{'description'} = $desc; - $vars->{'hasusers'} = $hasusers; - $vars->{'hasbugs'} = $hasbugs; - $vars->{'hasproduct'} = $hasproduct; - $vars->{'hasflags'} = $hasflags; - $vars->{'buglist'} = $buglist; + $vars->{'gid'} = $gid; + $vars->{'name'} = $name; + $vars->{'description'} = $desc; + $vars->{'hasusers'} = $hasusers; + $vars->{'hasbugs'} = $hasbugs; + $vars->{'hasproduct'} = $hasproduct; + $vars->{'hasflags'} = $hasflags; + $vars->{'shared_queries'} = $shared_queries; + $vars->{'buglist'} = $buglist; print $cgi->header(); $template->process("admin/groups/delete.html.tmpl", $vars) @@ -462,6 +469,8 @@ if ($action eq 'delete') { $dbh->do('UPDATE flagtypes SET request_group_id = ? WHERE request_group_id = ?', undef, (undef, $gid)); + $dbh->do('DELETE FROM namedquery_group_map WHERE group_id = ?', + undef, $gid); $dbh->do('DELETE FROM user_group_map WHERE group_id = ?', undef, $gid); $dbh->do('DELETE FROM group_group_map |