Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/application.php
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
if ( defined('DEBUG_MODE') && $this->isDebugMode() ) { | if ( defined('DEBUG_MODE') && $this->isDebugMode() ) { | ||||
$this->Debugger->profileFinish('kernel4_startup'); | $this->Debugger->profileFinish('kernel4_startup'); | ||||
} | } | ||||
$this->InitDone = true; | $this->InitDone = true; | ||||
if ( $this->GetVar('full_init', 1) ) { | |||||
alex: Use `PHP_SAPI !== 'cli'` instead of `1` to prevent `adm:OnStartup` event from executing while… | |||||
alexAuthorUnsubmitted Not Done ReplyIn fact we can replace that IF with following and remove all other changes in this diff: if ( PHP_SAPI !== 'cli' && !$this->isAdmin ) { alex: In fact we can replace that IF with following and remove all other changes in this diff:
```… | |||||
$this->HandleEvent(new kEvent('adm:OnStartup')); | $this->HandleEvent(new kEvent('adm:OnStartup')); | ||||
} | |||||
return true; | return true; | ||||
} | } | ||||
/** | /** | ||||
* Performs initialization of manager classes, that can be overridden from unit configs | * Performs initialization of manager classes, that can be overridden from unit configs | ||||
* | * | ||||
* @return void | * @return void | ||||
▲ Show 20 Lines • Show All 2687 Lines • Show Last 20 Lines |
Use PHP_SAPI !== 'cli' instead of 1 to prevent adm:OnStartup event from executing while in command line.