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

This commit is contained in:
Ralf Becker 2020-03-04 21:15:07 +01:00
parent f7989fc2c8
commit ab289eb5c1

View File

@ -56,6 +56,8 @@ require_once(EGW_INCLUDE_ROOT . '/api/src/loader/common.php');
* function to handle multilanguage support * 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))
@ -65,6 +67,7 @@ function lang($key,$vars=null)
} }
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')) if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))
{ {