BackendConfigForm: Fix that skipping the schema validation is not possible

fixes #9719
This commit is contained in:
Johannes Meyer 2015-07-23 12:25:30 +02:00
parent 910dee199f
commit 1d3a0f63eb
1 changed files with 9 additions and 4 deletions

View File

@ -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;