fix conflict with lang() function, by just instanciating setup class

This commit is contained in:
Ralf Becker 2020-03-05 10:29:53 +01:00
parent 5154bc2f70
commit 77a7d538f5

View File

@ -216,15 +216,30 @@ abstract class CalDAVTest extends TestCase
* @return \setup
*/
private static function getSetup()
{
static $setup=null;
if (!isset($setup))
{
if (!isset($_REQUEST['domain']))
{
$_REQUEST['domain'] = $GLOBALS['EGW_DOMAIN'] ?? 'default';
}
$_REQUEST['ConfigDomain'] = $_REQUEST['domain'];
require_once __DIR__.'/../../setup/inc/functions.inc.php';
return $GLOBALS['egw_setup'];
$GLOBALS['egw_info'] = array(
'flags' => array(
'noheader' => True,
'nonavbar' => True,
'currentapp' => 'setup',
'noapi' => True
));
if (file_exists(__DIR__ . '/../../header.inc.php'))
{
include_once(__DIR__ . '/../../header.inc.php');
}
$setup = new \setup();
}
return $setup;
}
/**