From 47d85da748963943ec9ffb90b1c0c1a94dccdada Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 9 Jun 2013 01:23:39 +0200 Subject: [PATCH] Fixed display of first step on (un-)install --- wcfsetup/install/files/acp/js/WCF.ACP.js | 12 +++++------ .../packageUninstallationStepPrepare.tpl | 2 +- .../action/UninstallPackageAction.class.php | 20 ++++++++++++++++++- wcfsetup/install/lang/de.xml | 2 +- wcfsetup/install/lang/en.xml | 2 +- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 28bdf0ca80..b4a1837d2b 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -503,6 +503,12 @@ WCF.ACP.Package.Installation = Class.extend({ this._queueID = data.queueID; } + // update template + if (data.template && !data.ignoreTemplate) { + this._dialog.html(data.template); + this._shouldRender = true; + } + // update progress if (data.progress) { $('#packageInstallationProgress').attr('value', data.progress).text(data.progress + '%'); @@ -528,12 +534,6 @@ WCF.ACP.Package.Installation = Class.extend({ return; } - // update template - if (data.template && !data.ignoreTemplate) { - this._dialog.html(data.template); - this._shouldRender = true; - } - // handle inner template if (data.innerTemplate) { var self = this; diff --git a/wcfsetup/install/files/acp/templates/packageUninstallationStepPrepare.tpl b/wcfsetup/install/files/acp/templates/packageUninstallationStepPrepare.tpl index e8ee167d8d..ace5ef853b 100644 --- a/wcfsetup/install/files/acp/templates/packageUninstallationStepPrepare.tpl +++ b/wcfsetup/install/files/acp/templates/packageUninstallationStepPrepare.tpl @@ -3,7 +3,7 @@
-

{lang}wcf.acp.package.uninstallation.title.packageName{/lang}

+

{lang}wcf.acp.package.uninstallation.title{/lang}

{lang}wcf.acp.package.uninstallation.step.prepare{/lang}

0%

diff --git a/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php b/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php index d92267f40a..2a3ffcb8e7 100644 --- a/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/UninstallPackageAction.class.php @@ -90,7 +90,7 @@ class UninstallPackageAction extends InstallPackageAction { 'template' => WCF::getTPL()->fetch($this->templateName), 'step' => 'uninstall', 'node' => $this->installation->nodeBuilder->getNextNode(), - 'currentAction' => WCF::getLanguage()->get('wcf.package.installation.step.uninstalling'), + 'currentAction' => $this->getCurrentAction($queueID), 'progress' => 0, 'queueID' => $queueID ); @@ -173,4 +173,22 @@ class UninstallPackageAction extends InstallPackageAction { break; } } + + /** + * @see wcf\acp\action\InstallPackageAction::getCurrentAction() + */ + protected function getCurrentAction($queueID) { + if ($queueID === null) { + // success message + $currentAction = WCF::getLanguage()->get('wcf.acp.package.uninstallation.step.' . $this->queue->action . '.success'); + } + else { + // build package name + $packageName = $this->installation->nodeBuilder->getPackageNameByQueue($queueID); + $installationType = $this->installation->nodeBuilder->getInstallationTypeByQueue($queueID); + $currentAction = WCF::getLanguage()->getDynamicVariable('wcf.acp.package.uninstallation.step.'.$installationType, array('packageName' => $packageName)); + } + + return $currentAction; + } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index c6b049fa40..e8548a30b0 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -852,8 +852,8 @@ getName()}“ wirklich deinstallieren?]]> + packageName}“ wird deinstalliert …]]> - packageName}“ wird deinstalliert …]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index cac1d11c06..151487d4bb 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -851,8 +851,8 @@ Examples for medium ID detection: getName()}”?]]> + packageName}” is being uninstalled …]]> - packageName}” is being uninstalled …]]> -- 2.20.1