/**
  * Process input from user and creates admin saves path in config file
  *
  * @param OA_Admin_UI_Component_Form $oForm
  * @param OX_Admin_UI_Install_Wizard $oWizard
  */
 protected function processConfigurationAction($oForm, $oWizard, $isUpgrade)
 {
     if ($isUpgrade) {
         $aConfig['config'] = $this->getUpgrader()->getConfig();
         $aUpgradeConfig = $oForm->populateConfig();
         //not much here, just previous path
         $previousInstallationPath = $aUpgradeConfig['config']['previousInstallationPath'];
     } else {
         $aConfig = $oForm->populateConfig();
     }
     $oUpgrader = $this->getUpgrader();
     $isUpgrade = $this->getInstallStatus()->isUpgrade();
     $configStepSuccess = true;
     $syncEnabled = true;
     // 1) Import any plugins present from the previous install
     $path = isset($previousInstallationPath) ? $previousInstallationPath : '';
     $path = get_magic_quotes_gpc() ? stripslashes($path) : $path;
     if ($path && $path != MAX_PATH) {
         $importOK = OX_Admin_UI_Install_InstallUtils::importPlugins($path);
         if (!$importOK) {
             $errMessage = $GLOBALS['strPathToPreviousError'];
             $configStepSuccess = false;
         }
     }
     // 2) Save config (if previous task was fine)
     if ($configStepSuccess) {
         if ($oUpgrader->saveConfig($aConfig['config'])) {
             $configStepSuccess = true;
             if (!OX_Admin_UI_Install_InstallUtils::checkFolderPermissions($aConfig['config']['store']['webDir'])) {
                 $errMessage = $GLOBALS['strImageDirLockedDetected'];
                 $configStepSuccess = false;
             }
         } else {
             if ($isUpgrade) {
                 $errMessage = $GLOBALS['strUnableUpdateConfFile'];
             } else {
                 $errMessage = $GLOBALS['strUnableCreateConfFile'];
             }
         }
     }
     //3) config saved, go ahead and save admin when new install
     if ($configStepSuccess && !$isUpgrade) {
         OA_Permission::switchToSystemProcessUser('Installer');
         // we set the default from: in OpenX emails to the administrator's email
         if (empty($GLOBALS['_MAX']['CONF']['email']['fromAddress'])) {
             $oUpgrader->oConfiguration->setValue('email', 'fromAddress', $aConfig['admin']['email']);
             $oUpgrader->oConfiguration->writeConfig(true);
         }
         // Save admin credentials
         $adminSaved = $oUpgrader->putAdmin($aConfig['admin'], $aConfig['prefs']);
         if (!$adminSaved) {
             $errMessage = $GLOBALS['strUnableToCreateAdmin'];
             $configStepSuccess = false;
         }
         OA_Permission::switchToSystemProcessUser();
         //get back to normal user previously logged in
     }
     $configStepSuccess = $configStepSuccess && empty($errMessage);
     if ($errMessage) {
         $this->setModelProperty('aMessages', array('error' => array($errMessage)));
     }
     return $configStepSuccess;
 }