fix to eliminate doublicate entris on multiple installs / reinstalls via add_acl

This commit is contained in:
Ralf Becker 2004-04-03 13:01:28 +00:00
parent 0bfe2bcd98
commit 6e36f7e652

View File

@ -1004,14 +1004,11 @@
}
foreach($apps as $app)
{
$this->db->query("DELETE FROM phpgw_acl WHERE acl_appname='$app' AND acl_location='$location' AND acl_account=$account");
if ($rights)
{
$this->db->query("INSERT INTO phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) VALUES('$app','$location',$account,$rights)");
}
else
{
$this->db->query("DELETE FROM phpgw_acl WHERE acl_appname='$app' AND acl_location='$location' AND acl_account=$account");
}
}
}
}