/** * Check if it's install process and given step is completed * * @param string $step * @param string $result result array (should contains name, type, status and errors fields) * @return bool */ public static function isInstallerStepCompleted($step, &$result) { $oStorage = OX_Admin_UI_Install_InstallUtils::getSessionStorage(); $oStatus = $oStorage->get('installStatus'); if (!isset($oStatus) || !$oStatus->isInstall() && !$oStatus->isUpgrade()) { self::logError($result, 'Installation process not detected'); return false; } else { $oWizard = new OX_Admin_UI_Install_Wizard($oStatus); if (!$oWizard->isStepCompleted($step)) { self::logError($result, 'Invalid installation step detected'); return false; } } return true; }