From 8aa93ba826666e21ec4e35e3082ed5edddb6903a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 27 Sep 2011 21:25:26 +0200 Subject: [PATCH] option.inc.php is now properly rewritten upon (un)installation --- .../package/PackageInstallationDispatcher.class.php | 9 ++++++++- .../package/PackageUninstallationDispatcher.class.php | 9 ++++++++- .../plugin/OptionPackageInstallationPlugin.class.php | 7 ------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index eb01a41c58..e8e549516f 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -3,6 +3,7 @@ namespace wcf\system\package; use wcf\system\menu\acp\ACPMenu; use wcf\data\application\ApplicationEditor; use wcf\data\language\LanguageEditor; +use wcf\data\option\OptionEditor; use wcf\data\package\installation\queue\PackageInstallationQueue; use wcf\data\package\installation\queue\PackageInstallationQueueEditor; use wcf\data\package\Package; @@ -116,7 +117,13 @@ class PackageInstallationDispatcher { $this->nodeBuilder->completeNode($node); // assign next node - $step->setNode($this->nodeBuilder->getNextNode($node)); + $node = $this->nodeBuilder->getNextNode($node); + $step->setNode($node); + + // update options.inc.php if installation is completed + if ($node == '') { + OptionEditor::resetCache(); + } return $step; } diff --git a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php index c85efacfd4..adfcb5e061 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php @@ -1,6 +1,7 @@ nodeBuilder->completeNode($node); + $node = $this->nodeBuilder->getNextNode($node); + + // update options.inc.php if uninstallation is completed + if ($node == '') { + OptionEditor::resetCache(); + } // return next node - return $this->nodeBuilder->getNextNode($node); + return $node; } /** diff --git a/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php index 481d74aac1..0702b3eb6d 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php @@ -98,11 +98,4 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP $optionEditor->update($data); } } - - /** - * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::cleanup() - */ - protected function cleanup() { - OptionEditor::resetCache(); - } } -- 2.20.1