From 1d3a0f63eb8f9391b77eeea8a81069287b55f71e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 23 Jul 2015 12:25:30 +0200 Subject: [PATCH] BackendConfigForm: Fix that skipping the schema validation is not possible fixes #9719 --- .../application/forms/Config/BackendConfigForm.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/forms/Config/BackendConfigForm.php b/modules/monitoring/application/forms/Config/BackendConfigForm.php index 504ec9a59..ade94128d 100644 --- a/modules/monitoring/application/forms/Config/BackendConfigForm.php +++ b/modules/monitoring/application/forms/Config/BackendConfigForm.php @@ -309,10 +309,15 @@ class BackendConfigForm extends ConfigForm return false; } - $resourceConfig = ResourceFactory::getResourceConfig($this->getValue('resource')); - if (! self::isValidIdoSchema($this, $resourceConfig) || !self::isValidIdoInstance($this, $resourceConfig)) { - $this->addSkipValidationCheckbox(); - return false; + if (($el = $this->getElement('skip_validation')) === null || false === $el->isChecked()) { + $resourceConfig = ResourceFactory::getResourceConfig($this->getValue('resource')); + if (! self::isValidIdoSchema($this, $resourceConfig) || !self::isValidIdoInstance($this, $resourceConfig)) { + if ($el === null) { + $this->addSkipValidationCheckbox(); + } + + return false; + } } return true;