forked from extern/egroupware
Fix minor bug in lang() for common, and update setup's version to match common
This commit is contained in:
parent
079fe30f02
commit
5f9d52623c
@ -1256,7 +1256,7 @@
|
||||
*/
|
||||
function lang($key,$vars=null)
|
||||
{
|
||||
if(!is_array($m1))
|
||||
if(!is_array($vars))
|
||||
{
|
||||
$vars = func_get_args();
|
||||
array_shift($vars); // remove $key
|
||||
|
@ -93,21 +93,17 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* function to handle multilanguage support
|
||||
*
|
||||
* function to handle multilanguage support
|
||||
*
|
||||
*/
|
||||
function lang($key,$m1='',$m2='',$m3='',$m4='',$m5='',$m6='',$m7='',$m8='',$m9='',$m10='')
|
||||
function lang($key,$vars=null)
|
||||
{
|
||||
if(is_array($m1))
|
||||
if(!is_array($vars))
|
||||
{
|
||||
$vars = $m1;
|
||||
$vars = func_get_args();
|
||||
array_shift($vars); // remove $key
|
||||
}
|
||||
else
|
||||
{
|
||||
$vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10);
|
||||
}
|
||||
$value = $GLOBALS['egw_setup']->translation->translate("$key", $vars );
|
||||
return $value;
|
||||
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user