From 6cd803ab3c0898ed11863915004cb8400a645705 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 7 Dec 2019 11:47:40 +0100 Subject: [PATCH] Fix language file validation when editing core Close #3118 --- .../files/lib/acp/form/DevtoolsProjectAddForm.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php index 179acca63c..c7632732b2 100644 --- a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php @@ -761,6 +761,10 @@ class DevtoolsProjectAddForm extends AbstractFormBuilderForm { case 'language': if ($value === 'language/*.xml') { $directory = FileUtil::addTrailingSlash(dirname($path . $value)); + if ($this->formObject !== null && $this->formObject->isCore()) { + $directory = FileUtil::addTrailingSlash(dirname($path . 'wcfsetup/install/lang/*.xml')); + } + $directoryUtil = DirectoryUtil::getInstance($directory); if (empty($directoryUtil->getFiles(SORT_ASC, Regex::compile('.+\.xml')))) { $formField->addValidationError( -- 2.20.1