From ed2717103753fc8cbc4c5ed8a4cabd5db55ad3df Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 2 Nov 2007 17:25:21 +0000 Subject: [PATCH] ebl cleanup git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5832 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/lib/Bweb.pm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 9dc4a6d2a5..1ee279e8a8 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -2738,8 +2738,8 @@ sub grant my $nb = $self->dbh_do(" INSERT INTO bweb_role_member (roleid, userid) SELECT roleid, userid FROM bweb_role, bweb_user - WHERE rolename IN ($role) - AND username IN ($username) + WHERE rolename IN ($role) + AND username IN ($username) "); return $nb; } @@ -2753,9 +2753,11 @@ sub grant_like my $nb = $self->dbh_do(" INSERT INTO bweb_role_member (roleid, userid) - SELECT roleid, a.userid FROM bweb_user AS a, bweb_role_member JOIN bweb_user USING (userid) - WHERE bweb_user.username = $copy - AND a.username = $user"); + SELECT roleid, a.userid + FROM bweb_user AS a, bweb_role_member + JOIN bweb_user USING (userid) + WHERE bweb_user.username = $copy + AND a.username = $user"); return $nb; } @@ -2768,9 +2770,9 @@ sub revoke_all $self->dbh_do(" DELETE FROM bweb_role_member WHERE userid IN ( - SELECT userid - FROM bweb_user - WHERE username in ($username) + SELECT userid + FROM bweb_user + WHERE username in ($username) )"); } @@ -2887,8 +2889,8 @@ sub display_user SELECT rolename, temp.userid FROM bweb_role LEFT JOIN (SELECT roleid, userid - FROM bweb_user JOIN bweb_role_member USING (userid) - WHERE username = $user) AS temp USING (roleid) + FROM bweb_user JOIN bweb_role_member USING (userid) + WHERE username = $user) AS temp USING (roleid) ORDER BY rolename ", 'rolename'); -- 2.39.5