init: fix setting isDevelopmentEnvironment in GlobalContext
This commit is contained in:
parent
c21619c429
commit
7e56087e46
@ -33,10 +33,9 @@ $globalContext = engine\GlobalContext::getInstance();
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (isCli()) {
|
if (isCli()) {
|
||||||
if (str_ends_with(__DIR__, 'www-dev'))
|
|
||||||
$globalContext->setIsDevelopmentEnvironment(true);
|
|
||||||
$_SERVER['HTTP_HOST'] = $config['domain'];
|
$_SERVER['HTTP_HOST'] = $config['domain'];
|
||||||
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
|
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
|
||||||
|
$globalContext->setIsDevelopmentEnvironment(str_ends_with(dirname(__DIR__), 'www-dev'));
|
||||||
} else {
|
} else {
|
||||||
// IE moment
|
// IE moment
|
||||||
if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false)
|
if (($pos = strpos($_SERVER['HTTP_HOST'], ':')) !== false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user