parent
7082ebaf7b
commit
2d957205ef
|
@ -109,11 +109,11 @@ class DbBackendForm extends Form
|
||||||
try {
|
try {
|
||||||
$dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig()));
|
$dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig()));
|
||||||
if ($dbUserBackend->count() < 1) {
|
if ($dbUserBackend->count() < 1) {
|
||||||
$form->addError($this->translate('No users found under the specified database backend'));
|
$form->addError($form->translate('No users found under the specified database backend'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(sprintf($this->translate('Using the specified backend failed: %s'), $e->getMessage()));
|
$form->addError(sprintf($form->translate('Using the specified backend failed: %s'), $e->getMessage()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ class LdapBackendForm extends Form
|
||||||
$form->addError($e->getMessage());
|
$form->addError($e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(sprintf($this->translate('Unable to validate authentication: %s'), $e->getMessage()));
|
$form->addError(sprintf($form->translate('Unable to validate authentication: %s'), $e->getMessage()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ class DbResourceForm extends Form
|
||||||
$resource->getConnection()->getConnection();
|
$resource->getConnection()->getConnection();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(
|
$form->addError(
|
||||||
$this->translate('Connectivity validation failed, connection to the given resource not possible.')
|
$form->translate('Connectivity validation failed, connection to the given resource not possible.')
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ class LdapResourceForm extends Form
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$form->addError(
|
$form->addError(
|
||||||
$this->translate('Connectivity validation failed, connection to the given resource not possible.')
|
$form->translate('Connectivity validation failed, connection to the given resource not possible.')
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ class LivestatusResourceForm extends Form
|
||||||
$resource->connect()->disconnect();
|
$resource->connect()->disconnect();
|
||||||
} catch (Exception $_) {
|
} catch (Exception $_) {
|
||||||
$form->addError(
|
$form->addError(
|
||||||
$this->translate('Connectivity validation failed, connection to the given resource not possible.')
|
$form->translate('Connectivity validation failed, connection to the given resource not possible.')
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue