<instruction type="acpMenu">acpMenu.xml</instruction>
<instruction type="clipboardAction">clipboardAction.xml</instruction>
<instruction type="coreObject">coreObject.xml</instruction>
- <instruction type="language">languages/*.xml</instruction>
+ <instruction type="language">language/*.xml</instruction>
<instruction type="option">option.xml</instruction>
<instruction type="userGroupOption">userGroupOption.xml</instruction>
</instructions>
this._allowRollback = (allowRollback === true) ? true : false;
this._queueID = queueID;
- this._dialogTitle = 'wcf.acp.package.installation.title';
- if (actionName == 'UninstallPackage') {
- this._dialogTitle = 'wcf.acp.package.uninstallation.title';
+ switch (actionName) {
+ case 'InstallPackage':
+ if (allowRollback) {
+ this._dialogTitle = 'wcf.acp.package.installation.title';
+ }
+ else {
+ this._dialogTitle = 'wcf.acp.package.update.title';
+ }
+ break;
+
+ case 'UninstallPackage':
+ this._dialogTitle = 'wcf.acp.package.uninstallation.title';
+ break;
}
this._initProxy();
$(function() {
WCF.Language.addObject({
'wcf.acp.package.installation.title': '{lang}wcf.acp.package.installation.title{/lang}',
- 'wcf.acp.package.uninstallation.title': '{lang}wcf.acp.package.uninstallation.title{/lang}'
+ 'wcf.acp.package.uninstallation.title': '{lang}wcf.acp.package.uninstallation.title{/lang}',
+ 'wcf.acp.package.update.title': '{lang}wcf.acp.package.update.title{/lang}'
});
new WCF.ACP.Package.Installation({@$queue->queueID}, undefined, {if $queue->action == 'install'}true{else}false{/if});
});
protected function getCurrentAction($queueID) {
if ($queueID === null) {
// success message
- $currentAction = WCF::getLanguage()->get('wcf.acp.package.installation.step.install.success');
+ $currentAction = WCF::getLanguage()->get('wcf.acp.package.installation.step.' . $this->queue->action . '.success');
}
else {
// build package name
$packageName = $this->installation->nodeBuilder->getPackageNameByQueue($queueID);
- $currentAction = WCF::getLanguage()->getDynamicVariable('wcf.acp.package.installation.step.install', array('packageName' => $packageName));
+ $installationType = $this->installation->nodeBuilder->getInstallationTypeByQueue($queueID);
+ $currentAction = WCF::getLanguage()->getDynamicVariable('wcf.acp.package.installation.step.'.$installationType, array('packageName' => $packageName));
}
return $currentAction;
// clear user storage
UserStorageHandler::getInstance()->clear();
+ // rebuild config files for affected applications
+ $sql = "SELECT package.packageID
+ FROM wcf1_package_installation_queue queue,
+ wcf1_package package
+ WHERE queue.processNo = ?
+ AND package.packageID = queue.packageID
+ AND package.packageID <> ?
+ AND package.isApplication = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array(
+ $this->queue->processNo,
+ 1,
+ 1
+ ));
+ while ($row = $statement->fetchArray()) {
+ Package::writeConfigFile($row['packageID']);
+ }
+
EventHandler::getInstance()->fireAction($this, 'postInstall');
+
+ // remove queues with the same process no
+ $sql = "DELETE FROM wcf".WCF_N."_package_installation_queue
+ WHERE processNo = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array($this->queue->processNo));
}
if ($this->requireRestructureVersionTables) {
return $row['packageName'];
}
+ /**
+ * Returns installation type by queue id.
+ *
+ * @param integer $queueID
+ * @return string
+ */
+ public function getInstallationTypeByQueue($queueID) {
+ $sql = "SELECT action
+ FROM wcf".WCF_N."_package_installation_queue
+ WHERE queueID = ?";
+ $statement = WCF::getDB()->prepareStatement($sql);
+ $statement->execute(array($queueID));
+ $row = $statement->fetchArray();
+
+ return $row['action'];
+ }
+
/**
* Returns data for current node.
*
<item name="wcf.acp.package.installation.step.install"><![CDATA[„{$packageName}“ wird installiert …]]></item>
<item name="wcf.acp.package.installation.step.install.success"><![CDATA[Installation abgeschlossen]]></item>
<item name="wcf.acp.package.installation.step.prepare"><![CDATA[Installation wird vorbereitet …]]></item>
+ <item name="wcf.acp.package.installation.step.update"><![CDATA[„{$packageName}“ wird aktualisiert …]]></item>
+ <item name="wcf.acp.package.installation.step.update.success"><![CDATA[Aktualisierung abgeschlossen]]></item>
<item name="wcf.acp.package.installation.title"><![CDATA[Installation]]></item>
<item name="wcf.acp.package.installation.requiredVersion"><![CDATA[Benötigte Version]]></item>
<item name="wcf.acp.package.license"><![CDATA[Lizenz]]></item>
<item name="wcf.acp.package.update.server"><![CDATA[Paket-Server]]></item>
<item name="wcf.acp.package.update.server.message"><![CDATA[Servermeldung]]></item>
<item name="wcf.acp.package.update.server.url"><![CDATA[URL]]></item>
+ <item name="wcf.acp.package.update.title"><![CDATA[Aktualisierung]]></item>
<item name="wcf.acp.package.update.unauthorized"><![CDATA[Authentifizierung erforderlich]]></item>
<item name="wcf.acp.package.update.username"><![CDATA[Benutzername]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>
<item name="wcf.acp.package.installation.step.install"><![CDATA[Installing “{$packageName}” …]]></item>
<item name="wcf.acp.package.installation.step.install.success"><![CDATA[Installation completed]]></item>
<item name="wcf.acp.package.installation.step.prepare"><![CDATA[Preparing Installation …]]></item>
+ <item name="wcf.acp.package.installation.step.update"><![CDATA[Updating “{$packageName}” …]]></item>
+ <item name="wcf.acp.package.installation.step.update.success"><![CDATA[Updated completed]]></item>
<item name="wcf.acp.package.installation.title"><![CDATA[Installation]]></item>
<item name="wcf.acp.package.installation.requiredVersion"><![CDATA[Required Version]]></item>
<item name="wcf.acp.package.license"><![CDATA[License]]></item>
<item name="wcf.acp.package.update.server"><![CDATA[Package Server]]></item>
<item name="wcf.acp.package.update.server.message"><![CDATA[Server Notice]]></item>
<item name="wcf.acp.package.update.server.url"><![CDATA[URL]]></item>
+ <item name="wcf.acp.package.update.title"><![CDATA[Update]]></item>
<item name="wcf.acp.package.update.unauthorized"><![CDATA[Authorization Required]]></item>
<item name="wcf.acp.package.update.username"><![CDATA[Username]]></item>
<item name="wcf.acp.package.version"><![CDATA[Version]]></item>