mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
deletes entries before inserting them
This commit is contained in:
parent
f00f6ef025
commit
879596beb3
@ -81,10 +81,18 @@
|
||||
if (!empty($account[1]["account_id"]) && !empty($account[1]["account_lid"]))
|
||||
@reset($s_apps);
|
||||
while ($app = each($s_apps)) {
|
||||
$sql = "DELETE FROM phpgw_acl WHERE acl_appname='".$app[1]."' AND acl_location='run' AND acl_account="
|
||||
. $account[1]["account_id"]." AMD acl_account_type='u'";
|
||||
$phpgw_setup->db->query($sql ,__LINE__,__FILE__);
|
||||
|
||||
$sql = "insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)"
|
||||
. " values('".$app[1]."','run',".$account[1]["account_id"].",'u',1)";
|
||||
$phpgw_setup->db->query($sql ,__LINE__,__FILE__);
|
||||
}
|
||||
$sql = "DELETE FROM phpgw_acl WHERE acl_appname='admin' AND acl_location='run' AND acl_account="
|
||||
. $account[1]["account_id"]." AMD acl_account_type='u'";
|
||||
$phpgw_setup->db->query($sql ,__LINE__,__FILE__);
|
||||
|
||||
$sql = "insert into phpgw_acl (acl_appname, acl_location, acl_account, acl_account_type, acl_rights)"
|
||||
. " values('admin','run',".$account[1]["account_id"].",'u',1)";
|
||||
$phpgw_setup->db->query($sql ,__LINE__,__FILE__);
|
||||
@ -150,7 +158,7 @@
|
||||
<select name="s_apps[]" multiple size="5">
|
||||
<?php
|
||||
while ($app = each($apps)) {
|
||||
echo '<option value="' . $app[0] . '" selected>' . $app[1]["name"] . '</option>';
|
||||
echo '<option value="' . $app[0] . '" selected>' . $app[1] . '</option>';
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user