Rename ConfigForm::setConfig() to ConfigForm::setIniConfig()
We do not want to override Zend_Form::setConfig() so this renaming is required. set*Ini*Config() because ConfigForm::save() utilizes an ini-writer to persist the configuration to disk. refs #5525
This commit is contained in:
parent
12b4865559
commit
f53519c54d
|
@ -46,7 +46,7 @@ class ConfigController extends ActionController
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$form = new GeneralConfigForm();
|
$form = new GeneralConfigForm();
|
||||||
$form->setConfig(IcingaConfig::app());
|
$form->setIniConfig(IcingaConfig::app());
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
@ -131,7 +131,7 @@ class ConfigController extends ActionController
|
||||||
public function authenticationAction()
|
public function authenticationAction()
|
||||||
{
|
{
|
||||||
$form = new AuthenticationBackendReorderForm();
|
$form = new AuthenticationBackendReorderForm();
|
||||||
$form->setConfig(IcingaConfig::app('authentication'));
|
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
@ -145,7 +145,7 @@ class ConfigController extends ActionController
|
||||||
public function createauthenticationbackendAction()
|
public function createauthenticationbackendAction()
|
||||||
{
|
{
|
||||||
$form = new AuthenticationBackendConfigForm();
|
$form = new AuthenticationBackendConfigForm();
|
||||||
$form->setConfig(IcingaConfig::app('authentication'));
|
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||||
$form->setRedirectUrl('config/authentication');
|
$form->setRedirectUrl('config/authentication');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
@ -161,7 +161,7 @@ class ConfigController extends ActionController
|
||||||
public function editauthenticationbackendAction()
|
public function editauthenticationbackendAction()
|
||||||
{
|
{
|
||||||
$form = new AuthenticationBackendConfigForm();
|
$form = new AuthenticationBackendConfigForm();
|
||||||
$form->setConfig(IcingaConfig::app('authentication'));
|
$form->setIniConfig(IcingaConfig::app('authentication'));
|
||||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||||
$form->setRedirectUrl('config/authentication');
|
$form->setRedirectUrl('config/authentication');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
@ -179,7 +179,7 @@ class ConfigController extends ActionController
|
||||||
$form = new ConfirmRemovalForm(array(
|
$form = new ConfirmRemovalForm(array(
|
||||||
'onSuccess' => function ($request) {
|
'onSuccess' => function ($request) {
|
||||||
$configForm = new AuthenticationBackendConfigForm();
|
$configForm = new AuthenticationBackendConfigForm();
|
||||||
$configForm->setConfig(IcingaConfig::app('authentication'));
|
$configForm->setIniConfig(IcingaConfig::app('authentication'));
|
||||||
$authBackend = $request->getQuery('auth_backend');
|
$authBackend = $request->getQuery('auth_backend');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -222,7 +222,7 @@ class ConfigController extends ActionController
|
||||||
public function createresourceAction()
|
public function createresourceAction()
|
||||||
{
|
{
|
||||||
$form = new ResourceConfigForm();
|
$form = new ResourceConfigForm();
|
||||||
$form->setConfig(IcingaConfig::app('resources'));
|
$form->setIniConfig(IcingaConfig::app('resources'));
|
||||||
$form->setRedirectUrl('config/resource');
|
$form->setRedirectUrl('config/resource');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ class ConfigController extends ActionController
|
||||||
public function editresourceAction()
|
public function editresourceAction()
|
||||||
{
|
{
|
||||||
$form = new ResourceConfigForm();
|
$form = new ResourceConfigForm();
|
||||||
$form->setConfig(IcingaConfig::app('resources'));
|
$form->setIniConfig(IcingaConfig::app('resources'));
|
||||||
$form->setRedirectUrl('config/resource');
|
$form->setRedirectUrl('config/resource');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ class ConfigController extends ActionController
|
||||||
$form = new ConfirmRemovalForm(array(
|
$form = new ConfirmRemovalForm(array(
|
||||||
'onSuccess' => function ($request) {
|
'onSuccess' => function ($request) {
|
||||||
$configForm = new ResourceConfigForm();
|
$configForm = new ResourceConfigForm();
|
||||||
$configForm->setConfig(IcingaConfig::app('resources'));
|
$configForm->setIniConfig(IcingaConfig::app('resources'));
|
||||||
$resource = $request->getQuery('resource');
|
$resource = $request->getQuery('resource');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -62,7 +62,7 @@ class AuthenticationBackendReorderForm extends ConfigForm
|
||||||
protected function getConfigForm()
|
protected function getConfigForm()
|
||||||
{
|
{
|
||||||
$form = new AuthenticationBackendConfigForm();
|
$form = new AuthenticationBackendConfigForm();
|
||||||
$form->setConfig($this->config);
|
$form->setIniConfig($this->config);
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ConfigForm extends Form
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setConfig(Config $config)
|
public function setIniConfig(Config $config)
|
||||||
{
|
{
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
public function editbackendAction()
|
public function editbackendAction()
|
||||||
{
|
{
|
||||||
$form = new BackendConfigForm();
|
$form = new BackendConfigForm();
|
||||||
$form->setConfig($this->Config('backends'));
|
$form->setIniConfig($this->Config('backends'));
|
||||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||||
$form->setRedirectUrl('monitoring/config');
|
$form->setRedirectUrl('monitoring/config');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
@ -45,7 +45,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
public function createbackendAction()
|
public function createbackendAction()
|
||||||
{
|
{
|
||||||
$form = new BackendConfigForm();
|
$form = new BackendConfigForm();
|
||||||
$form->setConfig($this->Config('backends'));
|
$form->setIniConfig($this->Config('backends'));
|
||||||
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
$form->setResourceConfig(ResourceFactory::getResourceConfigs());
|
||||||
$form->setRedirectUrl('monitoring/config');
|
$form->setRedirectUrl('monitoring/config');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
@ -63,7 +63,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
'onSuccess' => function ($request) use ($config) {
|
'onSuccess' => function ($request) use ($config) {
|
||||||
$backendName = $request->getQuery('backend');
|
$backendName = $request->getQuery('backend');
|
||||||
$configForm = new BackendConfigForm();
|
$configForm = new BackendConfigForm();
|
||||||
$configForm->setConfig($config);
|
$configForm->setIniConfig($config);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$configForm->remove($backendName);
|
$configForm->remove($backendName);
|
||||||
|
@ -95,7 +95,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
'onSuccess' => function ($request) use ($config) {
|
'onSuccess' => function ($request) use ($config) {
|
||||||
$instanceName = $request->getQuery('instance');
|
$instanceName = $request->getQuery('instance');
|
||||||
$configForm = new InstanceConfigForm();
|
$configForm = new InstanceConfigForm();
|
||||||
$configForm->setConfig($config);
|
$configForm->setIniConfig($config);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$configForm->remove($instanceName);
|
$configForm->remove($instanceName);
|
||||||
|
@ -123,7 +123,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
public function editinstanceAction()
|
public function editinstanceAction()
|
||||||
{
|
{
|
||||||
$form = new InstanceConfigForm();
|
$form = new InstanceConfigForm();
|
||||||
$form->setConfig($this->Config('instances'));
|
$form->setIniConfig($this->Config('instances'));
|
||||||
$form->setRedirectUrl('monitoring/config');
|
$form->setRedirectUrl('monitoring/config');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
public function createinstanceAction()
|
public function createinstanceAction()
|
||||||
{
|
{
|
||||||
$form = new InstanceConfigForm();
|
$form = new InstanceConfigForm();
|
||||||
$form->setConfig($this->Config('instances'));
|
$form->setIniConfig($this->Config('instances'));
|
||||||
$form->setRedirectUrl('monitoring/config');
|
$form->setRedirectUrl('monitoring/config');
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class Monitoring_ConfigController extends ModuleActionController
|
||||||
public function securityAction()
|
public function securityAction()
|
||||||
{
|
{
|
||||||
$form = new SecurityConfigForm();
|
$form = new SecurityConfigForm();
|
||||||
$form->setConfig($this->Config());
|
$form->setIniConfig($this->Config());
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
|
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
|
|
Loading…
Reference in New Issue