From a862c217c050f9fb37f5ec7ce46628c27738e318 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 13 Apr 2002 03:02:22 +0000 Subject: [PATCH] Cleaned up the extra comma at the end of the langs that are installed. --- phpgwapi/inc/class.setup_detection.inc.php | 2 +- setup/index.php | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/phpgwapi/inc/class.setup_detection.inc.php b/phpgwapi/inc/class.setup_detection.inc.php index cacddbd4a0..cfc346d582 100644 --- a/phpgwapi/inc/class.setup_detection.inc.php +++ b/phpgwapi/inc/class.setup_detection.inc.php @@ -353,7 +353,7 @@ reset($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->next_record(); $GLOBALS['phpgw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name'); diff --git a/setup/index.php b/setup/index.php index 9b77c973b0..02cc6ea7bb 100644 --- a/setup/index.php +++ b/setup/index.php @@ -395,16 +395,11 @@ reset ($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(@strlen($langs_list)) - { - if(substr($langs_list,0,-2) == ', ') + if($value) { - $langs_list = substr($langs_list,0,-2); + $langs_list .= ($langs_list?', ':'') . $value; } } - $setup_tpl->set_var('lang_status_img',$completed); $setup_tpl->set_var('lang_status_alt','completed'); $btn_manage_lang = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(