Revert "fix some errors in new phpUnit tests: define lang() only if not already done"

This reverts commit ab289eb5c1.
This commit is contained in:
Ralf Becker 2020-03-04 21:19:33 +01:00
parent ab289eb5c1
commit aa4750009f

View File

@ -56,17 +56,14 @@ require_once(EGW_INCLUDE_ROOT . '/api/src/loader/common.php');
* function to handle multilanguage support
*
*/
if (!function_exists('lang'))
function lang($key,$vars=null)
{
function lang($key, $vars = null)
if(!is_array($vars))
{
if (!is_array($vars))
{
$vars = func_get_args();
array_shift($vars); // remove $key
}
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
$vars = func_get_args();
array_shift($vars); // remove $key
}
return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
}
if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))