forked from extern/egroupware
fixed not showing up langs like 'es-ca' which hasn't been in phpgw_languages (or only as just 'ca')
This commit is contained in:
parent
551c66d68e
commit
5ea042041c
@ -378,9 +378,11 @@
|
||||
{
|
||||
$sql = "SELECT lang_name FROM $languagestbl WHERE lang_id = '".$value."'";
|
||||
$GLOBALS['phpgw_setup']->db->query($sql);
|
||||
$GLOBALS['phpgw_setup']->db->next_record();
|
||||
if ($GLOBALS['phpgw_setup']->db->next_record())
|
||||
{
|
||||
$GLOBALS['phpgw_info']['setup']['installed_langs'][$value] = $GLOBALS['phpgw_setup']->db->f('lang_name');
|
||||
}
|
||||
}
|
||||
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 3 (Completed)';
|
||||
return 10;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* Basic information about this app */
|
||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['version'] = '1.0.0.000';
|
||||
$setup_info['phpgwapi']['version'] = '1.0.0.001';
|
||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.27';
|
||||
$setup_info['phpgwapi']['enable'] = 3;
|
||||
$setup_info['phpgwapi']['app_order'] = 1;
|
||||
@ -55,3 +55,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -141,12 +141,11 @@
|
||||
'phpgw_languages' => array(
|
||||
'fd' => array(
|
||||
'lang_id' => array('type' => 'varchar','precision' => '5','nullable' => False),
|
||||
'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
||||
'available' => array('type' => 'char','precision' => '3','nullable' => False,'default' => 'No')
|
||||
'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)
|
||||
),
|
||||
'pk' => array('lang_id'),
|
||||
'ix' => array(),
|
||||
'fk' => array(),
|
||||
'ix' => array(),
|
||||
'uc' => array()
|
||||
),
|
||||
'phpgw_lang' => array(
|
||||
|
@ -1371,4 +1371,27 @@
|
||||
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.000';
|
||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
||||
}
|
||||
|
||||
|
||||
$test[] = '1.0.0.000';
|
||||
function phpgwapi_upgrade1_0_0_000()
|
||||
{
|
||||
// removing the not longer needed 'availible' column, that information is in the file setup/lang/languages
|
||||
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_languages',array(
|
||||
'fd' => array(
|
||||
'lang_id' => array('type' => 'varchar','precision' => '5','nullable' => False),
|
||||
'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)
|
||||
),
|
||||
'pk' => array('lang_id'),
|
||||
'ix' => array(),
|
||||
'fk' => array(),
|
||||
'uc' => array()
|
||||
),'available');
|
||||
|
||||
// correcting the id for Catalan
|
||||
$GLOBALS['phpgw_setup']->oProc->query("UPDATE phpgw_languages SET lang_id='es-ca' WHERE lang_id='ca'");
|
||||
|
||||
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.001';
|
||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
|
||||
}
|
||||
?>
|
||||
|
@ -89,12 +89,11 @@
|
||||
fclose($f);
|
||||
|
||||
$d = dir('./lang');
|
||||
while($entry=$d->read())
|
||||
while($file=$d->read())
|
||||
{
|
||||
if(ereg('^phpgw_',$entry))
|
||||
if(preg_match('/^phpgw_([-a-z]+).lang$/i',$file,$matches))
|
||||
{
|
||||
$z = substr($entry,6,2);
|
||||
$languages[$z]['available'] = True;
|
||||
$languages[$matches[1]]['available'] = True;
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
@ -61,7 +61,9 @@
|
||||
}
|
||||
$select_box_desc = lang('Select which languages you would like to use');
|
||||
$select_box = '';
|
||||
foreach(get_langs() as $id => $data)
|
||||
$languages = get_langs();
|
||||
uasort($languages,create_function('$a,$b','return strcmp(@$a[\'descr\'],@$b[\'descr\']);'));
|
||||
foreach($languages as $id => $data)
|
||||
{
|
||||
$select_box_langs =
|
||||
@$select_box_langs
|
||||
|
Loading…
Reference in New Issue
Block a user