mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 23:11:57 +01:00
try translating default group descriptions on read, in case they are not translated
This commit is contained in:
parent
381b9fa1a4
commit
6deedce782
@ -277,7 +277,7 @@ class Accounts
|
|||||||
foreach($account_search[$serial]['data'] as &$account)
|
foreach($account_search[$serial]['data'] as &$account)
|
||||||
{
|
{
|
||||||
// add default description for Admins and Default group
|
// add default description for Admins and Default group
|
||||||
if ($account['account_type'] === 'g' && empty($account['account_description']))
|
if ($account['account_type'] === 'g')
|
||||||
{
|
{
|
||||||
self::add_default_group_description($account);
|
self::add_default_group_description($account);
|
||||||
}
|
}
|
||||||
@ -379,7 +379,7 @@ class Accounts
|
|||||||
$data = self::cache_read($id);
|
$data = self::cache_read($id);
|
||||||
|
|
||||||
// add default description for Admins and Default group
|
// add default description for Admins and Default group
|
||||||
if ($data['account_type'] === 'g' && empty($data['account_description']))
|
if ($data['account_type'] === 'g')
|
||||||
{
|
{
|
||||||
self::add_default_group_description($data);
|
self::add_default_group_description($data);
|
||||||
}
|
}
|
||||||
@ -553,17 +553,24 @@ class Accounts
|
|||||||
*/
|
*/
|
||||||
protected static function add_default_group_description(array &$data)
|
protected static function add_default_group_description(array &$data)
|
||||||
{
|
{
|
||||||
switch($data['account_lid'])
|
if (empty($data['account_description']))
|
||||||
{
|
{
|
||||||
case 'Default':
|
switch($data['account_lid'])
|
||||||
$data['account_description'] = lang('EGroupware all users group, do NOT delete');
|
{
|
||||||
break;
|
case 'Default':
|
||||||
case 'Admins':
|
$data['account_description'] = lang('EGroupware all users group, do NOT delete');
|
||||||
$data['account_description'] = lang('EGroupware administrators group, do NOT delete');
|
break;
|
||||||
break;
|
case 'Admins':
|
||||||
case 'NoGroup':
|
$data['account_description'] = lang('EGroupware administrators group, do NOT delete');
|
||||||
$data['account_description'] = lang('EGroupware anonymous users group, do NOT delete');
|
break;
|
||||||
break;
|
case 'NoGroup':
|
||||||
|
$data['account_description'] = lang('EGroupware anonymous users group, do NOT delete');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data['account_description'] = lang($data['account_description']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user