$this->instructions['install'] = $instructionData;
}
else {
- $this->instructions['update'][$fromVersion][] = $instructionData;
+ $this->instructions['update'][$fromVersion] = $instructionData;
}
}
if ($this->package != null) {
$validFromVersion = null;
- foreach ($this->update as $fromVersion => $update) {
+ foreach ($this->instructions['update'] as $fromVersion => $update) {
if (Package::checkFromversion($this->package->packageVersion, $fromVersion)) {
$validFromVersion = $fromVersion;
break;
*/
public function getArchive() {
if ($this->archive === null) {
- $this->archive = new PackageArchive($this->queue->archive);
+ $this->archive = new PackageArchive($this->queue->archive, $this->getPackage());
if (FileUtil::isURL($this->archive->getArchive())) {
// get return value and update entry in
// remove node data
$this->nodeBuilder->purgeNodes();
+ // update package version
+ if ($this->action == 'update') {
+ $packageEditor = new PackageEditor($this->getPackage());
+ $packageEditor->update(array(
+ 'packageVersion' => $this->archive->getPackageInfo('version')
+ ));
+ }
+
// return next queue within the same process no
$queueID = $this->getNextQueue();