Fix for use of GLOBALS when setting up admin

This commit is contained in:
Miles Lott 2004-01-25 19:22:39 +00:00
parent 44bbcd3cad
commit 8bc4819f84

View File

@ -232,8 +232,8 @@
$phpgw_info['user']['account_id'] = $thisacctid; $phpgw_info['user']['account_id'] = $thisacctid;
$acl->account_id = (int)$thisacctid; $acl->account_id = (int)$thisacctid;
$acl->read_repository(); $acl->read_repository();
@reset($s_apps); @reset($_POST['s_apps']);
while (list($key,$app) = @each($s_apps)) while(list($key,$app) = @each($_POST['s_apps']))
{ {
$acl->delete($app,'run',1); $acl->delete($app,'run',1);
$acl->add($app,'run',1); $acl->add($app,'run',1);
@ -329,9 +329,9 @@
This is typically an exception to apps for run rights This is typically an exception to apps for run rights
as a group member. as a group member.
*/ */
for ($a=0;$a<count($_POST['admins']);$a++) for($a=0;$a<=count($_POST['admins']);$a++)
{ {
if ($admins[$a] == $thisacctid) if($_POST['admins'][$a] == $thisacctid)
{ {
$acl->delete('admin','run',1); $acl->delete('admin','run',1);
$acl->add('admin','run',1); $acl->add('admin','run',1);