From: Alexander Ebert Date: Tue, 18 Jul 2017 12:32:11 +0000 (+0200) Subject: Force skip of system critical templates on style export X-Git-Tag: 3.1.0_Alpha_1~245 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef8e61be6cef219faf58b41938f7c1ad2a8a4aad;p=GitHub%2FWoltLab%2FWCF.git Force skip of system critical templates on style export See #2335 --- diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 6d2a2f8dc8..a00a0d8d95 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -6,6 +6,7 @@ use wcf\data\package\Package; use wcf\data\package\PackageCache; use wcf\data\template\group\TemplateGroup; use wcf\data\template\group\TemplateGroupAction; +use wcf\data\template\Template; use wcf\data\template\TemplateEditor; use wcf\data\DatabaseObjectEditor; use wcf\data\IEditableCachedObject; @@ -730,6 +731,10 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $packageDir = 'com.woltlab.wcf'; $package = null; + if (Template::isSystemCritical($row['templateName'])) { + continue; + } + if ($row['application'] != 'wcf') { $application = ApplicationHandler::getInstance()->getApplication($row['application']); $package = PackageCache::getInstance()->getPackage($application->packageID);