/** * Recovery to old version * * @param unknown_type $upgradePackage * */ function doRecovery($product, $folder, $file) { global $jauc; //auto backup when recovery $this->doBackup(); // upgrade process $workingDir = FileSystemHelper::tmpDir(null, 'ja', 0777); $zipFile = $folder . $file; ArchiveHelper::unZip($zipFile, $workingDir); $workingDir = $workingDir . $this->extKey . DS; $objectFilter = new stdClass(); $this->_applyPackage($workingDir, $objectFilter); //get backup info $fileInfo = $folder . FileSystemHelper::stripExt($file) . ".txt"; if (($data = $jauc->_parseBackupInfo($fileInfo)) !== false) { return $data["version"]; } else { return ""; } }