/**
  * Process input from user and creates/upgrades DB etc....
  *
  * @param OA_Admin_UI_Component_Form $oForm
  * @param OX_Admin_UI_Install_Wizard $oWizard
  */
 protected function processDatabaseAction($oForm, $oWizard)
 {
     $oUpgrader = $this->getUpgrader();
     $upgraderSuccess = false;
     $aDbConfig = $oForm->populateDbConfig();
     if ($oUpgrader->canUpgradeOrInstall()) {
         $installStatus = $oUpgrader->existing_installation_status;
         define('DISABLE_ALL_EMAILS', 1);
         OA_Permission::switchToSystemProcessUser('Installer');
         if ($installStatus == OA_STATUS_NOT_INSTALLED) {
             if ($oUpgrader->install($aDbConfig)) {
                 $message = $GLOBALS['strDBInstallSuccess'];
                 $upgraderSuccess = true;
             }
         } else {
             if ($oUpgrader->upgrade($oUpgrader->package_file)) {
                 // Timezone support - hack
                 if ($oUpgrader->versionInitialSchema['tables_core'] < 538 && empty($aDbConfig['noTzAlert'])) {
                     OA_Dal_ApplicationVariables::set('utc_update', OA::getNowUTC());
                 }
                 // Clear the menu cache to built a new one with the new settings
                 OA_Admin_Menu::_clearCache(OA_ACCOUNT_ADMIN);
                 OA_Admin_Menu::_clearCache(OA_ACCOUNT_MANAGER);
                 OA_Admin_Menu::_clearCache(OA_ACCOUNT_ADVERTISER);
                 OA_Admin_Menu::_clearCache(OA_ACCOUNT_TRAFFICKER);
                 OA_Admin_Menu::singleton();
                 $message = $GLOBALS['strDBUpgradeSuccess'];
                 $upgraderSuccess = true;
             }
         }
         OA_Permission::switchToSystemProcessUser();
         //get back to normal user previously logged in
     } else {
         if ($oUpgrader->existing_installation_status == OA_STATUS_CURRENT_VERSION) {
             $upgraderSuccess = true;
             //rare but can occur if DB has been installed and user revisits the screen
         }
     }
     $dbSuccess = $upgraderSuccess && !$oUpgrader->oLogger->errorExists;
     if ($dbSuccess) {
         //show success status
         OA_Admin_UI::getInstance()->queueMessage($message, 'global', 'info');
     } else {
         //sth went wrong, display messages from upgrader
         $aMessages = OX_Admin_UI_Install_InstallUtils::getMessagesWithType($oUpgrader->getMessages());
         $this->setModelProperty('aMessages', $aMessages);
     }
     return $dbSuccess;
 }