Move creation of apps object up above app display vars

This commit is contained in:
Miles Lott 2001-03-14 18:51:47 +00:00
parent 063db53e99
commit 774857aad3

View File

@ -95,7 +95,7 @@
$allAccounts; $allAccounts;
$userGroups; $userGroups;
$groups_select = '<select name="account_groups[]" multiple>'; $groups_select = '<select name="account_groups[]" multiple>';
reset($allGroups); reset($allGroups);
while (list($key,$value) = each($allGroups)) while (list($key,$value) = each($allGroups))
@ -114,10 +114,14 @@
$groups_select .= '</select>'; $groups_select .= '</select>';
$t->set_var('groups_select',$groups_select); $t->set_var('groups_select',$groups_select);
// create list of available app // create list of available apps
$i = 0; $i = 0;
$apps = CreateObject('phpgwapi.applications',intval($_account_id));
$db_perms = $apps->read_account_specific();
@reset($phpgw_info['apps']);
$availableApps = $phpgw_info['apps']; $availableApps = $phpgw_info['apps'];
@asort($availableApps); @asort($availableApps);
@reset($availableApps); @reset($availableApps);
@ -132,11 +136,8 @@
} }
// create apps output // create apps output
$apps = CreateObject('phpgwapi.applications',intval($_account_id));
$db_perms = $apps->read_account_specific();
@reset($db_perms); @reset($db_perms);
for ($i=0;$i<=count($perm_display);$i++) for ($i=0;$i<=count($perm_display);$i++)
{ {
$checked = ''; $checked = '';
@ -394,4 +395,4 @@
$phpgw->common->hook_single('show_user_data', $app[0]); $phpgw->common->hook_single('show_user_data', $app[0]);
} }
?> ?>