From aba98afd3f9678ec54f2e37f6fda13024678d868 Mon Sep 17 00:00:00 2001
From: Matthias Jentsch <matthias.jentsch@netways.de>
Date: Tue, 27 Aug 2013 12:56:35 +0200
Subject: [PATCH] Change used ini writer to PreservingIniWriter to preserve
 configuration comments

refs #4610
---
 application/controllers/ConfigController.php | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php
index 5e6269ce8..b90fcd055 100644
--- a/application/controllers/ConfigController.php
+++ b/application/controllers/ConfigController.php
@@ -61,7 +61,6 @@ class ConfigController extends BaseConfigController
                     'url'       => Url::fromPath('/config')
                 )
             ),
-
             'authentication' => new Tab(
                 array(
                     'name'      => 'auth',
@@ -208,9 +207,6 @@ class ConfigController extends BaseConfigController
     /**
      * Write changes to an authentication file
      *
-     * This uses the Zend_Config_Writer_Ini implementation for now, as the Preserving ini writer can't
-     * handle ordering
-     *
      * @param   array $config The configuration changes
      *
      * @return  bool True when persisting succeeded, otherwise false
@@ -218,13 +214,7 @@ class ConfigController extends BaseConfigController
      * @see     writeConfigFile()
      */
     private function writeAuthenticationFile($config) {
-        $writer = new Zend_Config_Writer_Ini(
-            array(
-                'config' => new Zend_Config($config),
-                'filename' => IcingaConfig::app('authentication')->getConfigFile()
-            )
-        );
-        return $this->writeConfigFile($config, 'authentication', $writer);
+        return $this->writeConfigFile($config, 'authentication');
     }
 
     /**