summaryrefslogtreecommitdiffstats
path: root/editgroups.cgi
diff options
context:
space:
mode:
authorwurblzap%gmail.com <>2006-07-14 05:07:57 +0200
committerwurblzap%gmail.com <>2006-07-14 05:07:57 +0200
commitf0c7611262b3948e72e8a18a036569a78f3b51f2 (patch)
tree54b0e146d4f8fd3c466002728261c895d7709034 /editgroups.cgi
parent09495a118b165d60d17780a8623318c19d6ffae6 (diff)
downloadbugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.gz
bugzilla-f0c7611262b3948e72e8a18a036569a78f3b51f2.tar.xz
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-xeditgroups.cgi25
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