Cleaned up the extra comma at the end of the langs that are installed.

This commit is contained in:
skeeter 2002-04-13 03:02:22 +00:00
parent 3b4a9f0d89
commit a862c217c0
2 changed files with 3 additions and 8 deletions

View File

@ -353,7 +353,7 @@
reset($GLOBALS['phpgw_info']['setup']['installed_langs']); reset($GLOBALS['phpgw_info']['setup']['installed_langs']);
while(list($key, $value) = each($GLOBALS['phpgw_info']['setup']['installed_langs'])) while(list($key, $value) = each($GLOBALS['phpgw_info']['setup']['installed_langs']))
{ {
$sql = "SELECT lang_name FROM $langstbl WHERE lang_id = '".$value."';"; $sql = "SELECT lang_name FROM $langstbl WHERE lang_id = '".$value."'";
$GLOBALS['phpgw_setup']->db->query($sql); $GLOBALS['phpgw_setup']->db->query($sql);
$GLOBALS['phpgw_setup']->db->next_record(); $GLOBALS['phpgw_setup']->db->next_record();
$GLOBALS['phpgw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name'); $GLOBALS['phpgw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name');

View File

@ -395,16 +395,11 @@
reset ($GLOBALS['phpgw_info']['setup']['installed_langs']); reset ($GLOBALS['phpgw_info']['setup']['installed_langs']);
while (list ($key, $value) = each ($GLOBALS['phpgw_info']['setup']['installed_langs'])) while (list ($key, $value) = each ($GLOBALS['phpgw_info']['setup']['installed_langs']))
{ {
$langs_list = ($langs_list ? $langs_list . ', ' : '') . $value; if($value)
}
if(@strlen($langs_list))
{ {
if(substr($langs_list,0,-2) == ', ') $langs_list .= ($langs_list?', ':'') . $value;
{
$langs_list = substr($langs_list,0,-2);
} }
} }
$setup_tpl->set_var('lang_status_img',$completed); $setup_tpl->set_var('lang_status_img',$completed);
$setup_tpl->set_var('lang_status_alt','completed'); $setup_tpl->set_var('lang_status_alt','completed');
$btn_manage_lang = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple( $btn_manage_lang = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(