public function databaseAction() { $oWizard = new OX_Admin_UI_Install_Wizard($this->getInstallStatus()); $this->setCurrentStepIfReachable($oWizard, 'database'); $oUpgrader = $this->getUpgrader(); $isUpgrade = $this->getInstallStatus()->isUpgrade(); //setup form $aDbTypes = OX_Admin_UI_Install_InstallUtils::getSupportedDbTypes(); $aTableTypes = OX_Admin_UI_Install_InstallUtils::getSupportedTableTypes(); $hasZoneError = $isUpgrade && OX_Admin_UI_Install_InstallUtils::hasZoneError($oUpgrader); $oForm = new OX_Admin_UI_Install_DbForm($this->oTranslation, $oWizard->getCurrentStep(), $aDbTypes, $aTableTypes, $isUpgrade, $hasZoneError); //populate form with defaults from upgrader dsn $oUpgrader->canUpgradeOrInstall(); //need to call upgrade, otherwise no db data will be available $aConfig = $oUpgrader->aDsn; $aConfig['detectedVersion'] = $oUpgrader->getProductApplicationVersion(); //get default socket if (empty($aConfig['database']['socket']) && $aConfig['database']['type'] == 'mysql') { $aConfig['database']['socket'] = str_replace("'", '', ini_get('mysql.default_socket')); } $oForm->populateForm($aConfig); //process the request if ($oForm->isSubmitted() && $oForm->validate()) { if ($this->processDatabaseAction($oForm, $oWizard)) { $oWizard->markStepAsCompleted(); if (!$oWizard->isStep('configuration')) { $this->redirect('jobs'); } else { $this->redirect($oWizard->getNextStep()); } } } $loaderMessage = $isUpgrade ? $GLOBALS['strDbProgressMessageUpgrade'] : $GLOBALS['strDbProgressMessageInstall']; $this->setModelProperty('isUpgrade', $isUpgrade); $this->setModelProperty('loaderMessage', $loaderMessage); $this->setModelProperty('form', $oForm->serialize()); $this->setModelProperty('oWizard', $oWizard); }