From: Matthias Schmidt Date: Tue, 10 Sep 2019 16:08:06 +0000 (+0200) Subject: Fix writability check during WCF updates X-Git-Tag: 5.2.0_Beta_2~28^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b1e1aeec0025cafdb16e8e1cb670cfd480389f9;p=GitHub%2FWoltLab%2FWCF.git Fix writability check during WCF updates --- diff --git a/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php b/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php index b8e6f50e2b..260b55fd4f 100755 --- a/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php @@ -153,6 +153,10 @@ class InstallPackageAction extends AbstractDialogAction { // clean-up previously created nodes $this->installation->nodeBuilder->purgeNodes(); + if ($this->installation->getAction() === 'update' && $this->queue->package === 'com.woltlab.wcf') { + WCF::checkWritability(); + } + // create node tree $this->installation->nodeBuilder->buildNodes(); $nextNode = $this->installation->nodeBuilder->getNextNode(); diff --git a/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php b/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php index e5dafa1f4d..b705dfe488 100644 --- a/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/PackageCLICommand.class.php @@ -313,6 +313,10 @@ class PackageCLICommand implements IArgumentedCLICommand { // clean-up previously created nodes $installation->nodeBuilder->purgeNodes(); + if ($package !== null && $package->package === 'com.woltlab.wcf') { + WCF::checkWritability(); + } + // create node tree $installation->nodeBuilder->buildNodes(); $node = $installation->nodeBuilder->getNextNode(); diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 551219baae..54b55c1632 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -396,10 +396,6 @@ class PackageInstallationDispatcher { protected function installPackage(array $nodeData) { $installationStep = new PackageInstallationStep(); - if ($this->getAction() === 'update' && $this->getPackageName() === 'com.woltlab.wcf') { - WCF::checkWritability(); - } - // check requirements if (!empty($nodeData['requirements'])) { foreach ($nodeData['requirements'] as $package => $requirementData) { diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index b21a3d6522..8ba9dfb159 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -509,6 +509,10 @@ class PackageInstallationNodeBuilder { } } + if ($archive->getPackageInfo('name') === 'com.woltlab.wcf') { + WCF::checkWritability(); + } + // create new queue $queue = PackageInstallationQueueEditor::create([ 'parentQueueID' => $queue->queueID,