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

@ -217,14 +217,29 @@ abstract class CalDAVTest extends TestCase
*/
private static function getSetup()
{
if (!isset($_REQUEST['domain']))
static $setup=null;
if (!isset($setup))
{
$_REQUEST['domain'] = $GLOBALS['EGW_DOMAIN'] ?? 'default';
}
$_REQUEST['ConfigDomain'] = $_REQUEST['domain'];
require_once __DIR__.'/../../setup/inc/functions.inc.php';
if (!isset($_REQUEST['domain']))
{
$_REQUEST['domain'] = $GLOBALS['EGW_DOMAIN'] ?? 'default';
}
$_REQUEST['ConfigDomain'] = $_REQUEST['domain'];
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;
}
/**