mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fix some errors in new phpUnit tests: define lang() only if not already done
This commit is contained in:
parent
f7989fc2c8
commit
ab289eb5c1
@ -56,14 +56,17 @@ require_once(EGW_INCLUDE_ROOT . '/api/src/loader/common.php');
|
||||
* function to handle multilanguage support
|
||||
*
|
||||
*/
|
||||
function lang($key,$vars=null)
|
||||
if (!function_exists('lang'))
|
||||
{
|
||||
if(!is_array($vars))
|
||||
function lang($key, $vars = null)
|
||||
{
|
||||
$vars = func_get_args();
|
||||
array_shift($vars); // remove $key
|
||||
if (!is_array($vars))
|
||||
{
|
||||
$vars = func_get_args();
|
||||
array_shift($vars); // remove $key
|
||||
}
|
||||
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
|
||||
}
|
||||
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
|
||||
}
|
||||
|
||||
if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))
|
||||
|
Loading…
Reference in New Issue
Block a user