mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
sorted apps in user-manage after their titel and not after the not shown app-name
This commit is contained in:
parent
cfc0ec8eb4
commit
1dfcc53846
@ -1133,48 +1133,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* create list of available apps */
|
/* create list of available apps */
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
$apps = CreateObject('phpgwapi.applications',$_account_id);
|
$apps = CreateObject('phpgwapi.applications',$_account_id);
|
||||||
$db_perms = $apps->read_account_specific();
|
$db_perms = $apps->read_account_specific();
|
||||||
|
|
||||||
@reset($GLOBALS['phpgw_info']['apps']);
|
|
||||||
$availableApps = $GLOBALS['phpgw_info']['apps'];
|
$availableApps = $GLOBALS['phpgw_info']['apps'];
|
||||||
@asort($availableApps);
|
uasort($availableApps,create_function('$a,$b','return strcasecmp($a["title"],$b["title"]);'));
|
||||||
@reset($availableApps);
|
|
||||||
while (list($key,$application) = each($availableApps))
|
|
||||||
{
|
|
||||||
if ($application['enabled'] && $application['status'] != 3)
|
|
||||||
{
|
|
||||||
$perm_display[$i]['appName'] = $key;
|
|
||||||
$perm_display[$i]['title'] = $application['title'];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create apps output */
|
|
||||||
$appRightsOutput = '';
|
$appRightsOutput = '';
|
||||||
// @reset($perm_display);
|
$i = 0;
|
||||||
for ($i=0;$i<=count($perm_display);$i++)
|
foreach($availableApps as $app => $data)
|
||||||
{
|
{
|
||||||
$checked = ((($userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]) && $_account_id)?' checked':'');
|
if (!$data['enabled'] || $data['status'] == 3)
|
||||||
|
|
||||||
if ($perm_display[$i]['title'])
|
|
||||||
{
|
{
|
||||||
$part[$i&1] = sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]" value="True"%s></td>',
|
continue;
|
||||||
$perm_display[$i]['title'],
|
|
||||||
$perm_display[$i]['appName'],
|
|
||||||
$checked);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$part[1] = '<td colspan="2"> </td>';
|
|
||||||
}
|
}
|
||||||
|
$checked = (@$userData['account_permissions'][$app] || @$db_perms[$app]) && $_account_id ? ' checked' : '';
|
||||||
|
$part[$i&1] = sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]" value="True"%s></td>',
|
||||||
|
$data['title'],$app,$checked);
|
||||||
|
|
||||||
if ($i & 1)
|
if ($i & 1)
|
||||||
{
|
{
|
||||||
$appRightsOutput .= sprintf('<tr bgcolor="%s">%s%s</tr>',$this->nextmatchs->alternate_row_color()/*$GLOBALS['phpgw_info']['theme']['row_on']*/, $part[0], $part[1]);
|
$appRightsOutput .= sprintf('<tr bgcolor="%s">%s%s</tr>',$this->nextmatchs->alternate_row_color(), $part[0], $part[1]);
|
||||||
}
|
}
|
||||||
|
++$i;
|
||||||
|
}
|
||||||
|
if ($i & 1)
|
||||||
|
{
|
||||||
|
$part[1] = '<td colspan="2"> </td>';
|
||||||
|
$appRightsOutput .= sprintf('<tr bgcolor="%s">%s%s</tr>',$this->nextmatchs->alternate_row_color(), $part[0], $part[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
|
Loading…
Reference in New Issue
Block a user