Esempio n. 1
0
            report('Error : Patch does not match current version ...', true);
        } else {
            verbose('-> Patch version match.');
        }
        //read install param file and do maximum check on it before starting the installation process
        verbose('Read install file...');
        $installFile = new CMS_file(PATH_TMP_FS . "/install");
        if ($installFile->exists()) {
            $install = $installFile->readContent("array");
        } else {
            report('Error : File ' . PATH_TMP_FS . '/install does not exists ... This file is not a valid Automne patch.', true);
        }
        $installError = $automnePatch->checkInstall($install, $errorsInfos);
        if ($installError) {
            report('Error : Invalid install file :');
            $stopProcess = $automnePatch->canCorrectErrors($errorsInfos) ? false : true;
            report($installError, $stopProcess);
            if (!$force) {
                //if process continue, then we can correct patch errors.
                //save errors infos
                CMS_session::setSessionVar('patchErrors', $errorsInfos);
                //go to errors correction page
                $send = '
				<div id="correctUpdateErrors"></div>
				<script type="text/javascript">
					Ext.getCmp(\'serverWindow\').correctUpdateErrors();
				</script>';
                $content .= $send;
                echo $content;
                exit;
            }