moved generation and translation of app-title into applications-class

This commit is contained in:
Ralf Becker 2003-03-22 12:29:42 +00:00
parent 6b0665f005
commit d948f09973
4 changed files with 14 additions and 6 deletions

View File

@ -808,7 +808,7 @@
$tr_color = $this->nextmatchs->alternate_row_color();
$perm_html .= '<tr class="'.$tr_color.'">';
}
$perm_html .= '<td width="40%">' . lang($perm_display[$i][1]) . '</td>'
$perm_html .= '<td width="40%">' . $perm_display[$i][1] . '</td>'
. '<td width="5%"><input type="checkbox" name="account_apps['
. $perm_display[$i][0] . ']" value="True"'.($group_info['account_apps'][$app]?' checked':'').'></td><td width="5%" align="center">'
. ($apps_with_acl[$app] && $group_info['account_id']?'<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$app.'&owner='.$group_info['account_id'])
@ -1054,7 +1054,7 @@
if ($perm_display[$i]['translatedName'])
{
$part1 = sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]" value="True"%s></td>',
lang($perm_display[$i]['translatedName']),
$perm_display[$i]['translatedName'],
$perm_display[$i]['appName'],
($userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]?' checked':''));
}
@ -1064,7 +1064,7 @@
if ($perm_display[$i]['translatedName'])
{
$part2 = sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]" value="True"%s></td>',
lang($perm_display[$i]['translatedName']),
$perm_display[$i]['translatedName'],
$perm_display[$i]['appName'],
($userData['account_permissions'][$perm_display[$i]['appName']] || $db_perms[$perm_display[$i]['appName']]?' checked':''));
}

View File

@ -20,6 +20,7 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\**************************************************************************/
/* $Id$ */
/*!
@class applicatons
@abstract functions for managing and installing apps
@ -300,9 +301,15 @@
{
while ($this->db->next_record())
{
$title = $this->db->f('app_name');
if (@is_array($GLOBALS['phpgw_info']['user']['preferences']) &&
($t = lang($title)) != $title.'*')
{
$title = $t;
}
$GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')] = Array
(
'title' => $this->db->f('app_name'),
'title' => $title,
'name' => $this->db->f('app_name'),
'enabled' => True,
'status' => $this->db->f('app_enabled'),

View File

@ -1259,7 +1259,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
$var['applications'][] = array
(
'icon' => $data['icon'],
'title' => $data['title'],
'title' => $GLOBALS['phpgw_info']['apps'][$app]['title'],
'img_src_over' => $data['icon_hover'],
'url' => $data['url'],
'name' => str_replace('-','_',$app),
@ -1384,7 +1384,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
if ($GLOBALS['phpgw_info']['apps'][$app]['status'] != 2 && $GLOBALS['phpgw_info']['apps'][$app]['status'] != 3)
{
$GLOBALS['phpgw_info']['navbar'][$app]['title'] = lang($data['title']);
$GLOBALS['phpgw_info']['navbar'][$app]['title'] = $data['title'];
$GLOBALS['phpgw_info']['navbar'][$app]['url'] = $GLOBALS['phpgw']->link('/' . $app . '/index.php');
$GLOBALS['phpgw_info']['navbar'][$app]['name'] = $app;

View File

@ -351,6 +351,7 @@
/* This will make sure that a user has the basic default prefs. If not it will add them */
$GLOBALS['phpgw']->preferences->verify_basic_settings();
$GLOBALS['phpgw']->applications->read_installed_apps(); // to get translated app-titles
/********* Optional classes, which can be disabled for performance increases *********/
while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))