$packageEditor = new PackageEditor(new Package($this->queue->packageID));
$packageEditor->update($nodeData);
- // update excluded packages
- if (count($this->getArchive()->getExcludedPackages()) > 0) {
- $sql = "INSERT IGNORE INTO wcf".WCF_N."_package_exclusion
- (packageID, excludedPackage, excludedPackageVersion)
- VALUES (?, ?, ?)";
- $statement = WCF::getDB()->prepareStatement($sql);
-
- foreach ($this->getArchive()->getExcludedPackages() as $excludedPackage) {
- $statement->execute(array($this->queue->packageID, $excludedPackage['name'], (!empty($excludedPackage['version']) ? $excludedPackage['version'] : '')));
- }
- }
+ // delete old excluded packages
+ $sql = "DELETE FROM wcf".WCF_N."_package_exclusion
+ WHERE packageID = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array($this->queue->packageID));
// insert requirements and dependencies
$requirements = $this->getArchive()->getAllExistingRequirements();
'packageID' => $package->packageID
));
- // save excluded packages
- if (count($this->getArchive()->getExcludedPackages()) > 0) {
- $sql = "INSERT INTO wcf".WCF_N."_package_exclusion
- (packageID, excludedPackage, excludedPackageVersion)
- VALUES (?, ?, ?)";
- $statement = WCF::getDB()->prepareStatement($sql);
-
- foreach ($this->getArchive()->getExcludedPackages() as $excludedPackage) {
- $statement->execute(array($package->packageID, $excludedPackage['name'], (!empty($excludedPackage['version']) ? $excludedPackage['version'] : '')));
- }
- }
-
// insert requirements and dependencies
$requirements = $this->getArchive()->getAllExistingRequirements();
if (!empty($requirements)) {
}
}
+ // save excluded packages
+ if (count($this->getArchive()->getExcludedPackages())) {
+ $sql = "INSERT INTO wcf".WCF_N."_package_exclusion
+ (packageID, excludedPackage, excludedPackageVersion)
+ VALUES (?, ?, ?)";
+ $statement = WCF::getDB()->prepareStatement($sql);
+
+ foreach ($this->getArchive()->getExcludedPackages() as $excludedPackage) {
+ $statement->execute(array($this->queue->packageID, $excludedPackage['name'], (!empty($excludedPackage['version']) ? $excludedPackage['version'] : '')));
+ }
+ }
+
if ($this->getPackage()->isApplication && $this->getPackage()->package != 'com.woltlab.wcf' && $this->getAction() == 'install') {
if (empty($this->getPackage()->packageDir)) {
$document = $this->promptPackageDir();