예제 #1
0
         }
     }
     $action = OA_UPGRADE_CONFIGSETUP;
 } else {
     if (array_key_exists('btn_adminsetup', $_POST)) {
         if (!OA_Upgrade_Login::checkLogin()) {
             $message = $strUsernameOrPasswordWrong;
             $action = OA_UPGRADE_LOGIN;
         } else {
             // Acquire the sync settings from session in order to add them
             session_start();
             $syncEnabled = !empty($_SESSION['checkForUpdates']);
             // Store the detected timezone of the system, whatever that is
             require_once '../../lib/OX/Admin/Timezones.php';
             $timezone['timezone'] = OX_Admin_Timezones::getTimezone();
             if ($oUpgrader->saveConfig($_POST['aConfig']) && $oUpgrader->putSyncSettings($syncEnabled) && $oUpgrader->putTimezoneAccountPreference($aTimezone, true)) {
                 if (!checkFolderPermissions($_POST['aConfig']['store']['webDir'])) {
                     $aConfig = $_POST['aConfig'];
                     $aConfig['store']['webDir'] = stripslashes($aConfig['store']['webDir']);
                     $errMessage = $strImageDirLockedDetected;
                     $action = OA_UPGRADE_CONFIGSETUP;
                 } else {
                     if ($_COOKIE['oat'] == OA_UPGRADE_INSTALL) {
                         $action = OA_UPGRADE_ADMINSETUP;
                     } else {
                         $message = $strUpgradeComplete;
                         $action = OA_UPGRADE_PLUGINS;
                     }
                 }
             } else {
                 $aConfig = $_POST['aConfig'];