From a0952923f1782cba8bb9582cf5ea1460fcfa3791 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 8 Jun 2021 13:48:03 +0200 Subject: [PATCH] Add `TemplateDeletePackageInstallationPlugin` --- XSD/templateDelete.xsd | 27 ++++++++++++++ com.woltlab.wcf/packageInstallationPlugin.xml | 1 + ...eDeletePackageInstallationPlugin.class.php | 37 +++++++++++++++++++ wcfsetup/install/lang/de.xml | 4 ++ wcfsetup/install/lang/en.xml | 4 ++ 5 files changed, 73 insertions(+) create mode 100644 XSD/templateDelete.xsd create mode 100644 wcfsetup/install/files/lib/system/package/plugin/TemplateDeletePackageInstallationPlugin.class.php diff --git a/XSD/templateDelete.xsd b/XSD/templateDelete.xsd new file mode 100644 index 0000000000..d72924d107 --- /dev/null +++ b/XSD/templateDelete.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.woltlab.wcf/packageInstallationPlugin.xml b/com.woltlab.wcf/packageInstallationPlugin.xml index 9274500c83..87090a2d76 100644 --- a/com.woltlab.wcf/packageInstallationPlugin.xml +++ b/com.woltlab.wcf/packageInstallationPlugin.xml @@ -33,6 +33,7 @@ wcf\system\package\plugin\MediaProviderPackageInstallationPlugin wcf\system\package\plugin\DatabasePackageInstallationPlugin wcf\system\package\plugin\FileDeletePackageInstallationPlugin + wcf\system\package\plugin\TemplateDeletePackageInstallationPlugin wcf\system\package\plugin\AcpTemplateDeletePackageInstallationPlugin diff --git a/wcfsetup/install/files/lib/system/package/plugin/TemplateDeletePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/TemplateDeletePackageInstallationPlugin.class.php new file mode 100644 index 0000000000..cf4020f232 --- /dev/null +++ b/wcfsetup/install/files/lib/system/package/plugin/TemplateDeletePackageInstallationPlugin.class.php @@ -0,0 +1,37 @@ + + * @package WoltLabSuite\Core\System\Package\Plugin + * @since 5.5 + */ +final class TemplateDeletePackageInstallationPlugin extends AbstractTemplateDeletePackageInstallationPlugin +{ + /** + * @inheritDoc + */ + protected function getLogTableName(): string + { + return 'wcf1_template'; + } + + /** + * @inheritDoc + */ + protected function getFilePath(string $filename, string $application): string + { + return \sprintf( + '%s/templates/%s.tpl', + Application::getDirectory($application), + $filename + ); + } +} diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 15a68cb2e1..a4db7d55db 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2646,6 +2646,10 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen fileDelete-Package Installation Plugin löscht Dateien, die mit dem file-Package Installation Plugin installiert wurden. {if LANGUAGE_USE_INFORMAL_VARIANT}Du kannst{else}Sie können{/if} mehr Informationen in der Entwickler-Dokumentation finden.]]> + templateDelete-Package Installation Plugin löscht Templates, die mit dem template-Package Installation Plugin installiert wurden. {if LANGUAGE_USE_INFORMAL_VARIANT}Du kannst{else}Sie können{/if} mehr Informationen in der Entwickler-Dokumentation finden.]]> + + .tpl an.]]> + acpTemplateDelete-Package Installation Plugin löscht Templates, die mit dem acpTemplate-Package Installation Plugin installiert wurden. {if LANGUAGE_USE_INFORMAL_VARIANT}Du kannst{else}Sie können{/if} mehr Informationen in der Entwickler-Dokumentation finden.]]> .tpl an.]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index b857c60828..9519c9da83 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2576,6 +2576,10 @@ If you have already bought the licenses for the listed apps, th fileDelete package installation plugin installs deletes files installed with the file package installation plugin. You can find more information in the developer documentation.]]> + templateDelete package installation plugin installs deletes templates installed with the template package installation plugin. You can find more information in the developer documentation.]]> + + .tpl.]]> + acpTemplateDelete package installation plugin installs deletes templates installed with the acpTemplate package installation plugin. You can find more information in the developer documentation.]]> .tpl.]]> -- 2.20.1