Revert "some fixes for errors in phpUnit in CalDAV tests"

This reverts commit 9d38bf3e97.
This commit is contained in:
Ralf Becker 2020-03-04 20:50:32 +01:00
parent 1f84af1966
commit f7989fc2c8

View File

@ -25,9 +25,9 @@ $GLOBALS['egw_info'] = array(
'currentapp' => 'setup', 'currentapp' => 'setup',
'noapi' => True 'noapi' => True
)); ));
if(file_exists(__DIR__.'/../../header.inc.php')) if(file_exists('../header.inc.php'))
{ {
include_once(__DIR__.'/../../header.inc.php'); include('../header.inc.php');
} }
// for an old header we need to setup a reference for the domains // for an old header we need to setup a reference for the domains
if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain']; if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain'];
@ -56,17 +56,14 @@ 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))
{ {
$vars = func_get_args(); $vars = func_get_args();
array_shift($vars); // remove $key 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')) if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))