From f5160d212fd2f73f79e306f50dea1870308dbb03 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 17 Aug 2012 08:11:18 -0400
Subject: [PATCH] Implemented action to enable auto-config.

---
 .../VuFind/src/VuFind/Controller/AdminController.php  | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/AdminController.php b/module/VuFind/src/VuFind/Controller/AdminController.php
index e6b6bde7d6f..e4ce8810d15 100644
--- a/module/VuFind/src/VuFind/Controller/AdminController.php
+++ b/module/VuFind/src/VuFind/Controller/AdminController.php
@@ -238,12 +238,10 @@ class AdminController extends AbstractBase
      */
     public function enableautoconfigAction()
     {
-        /* TODO
-        $configDir = LOCAL_OVERRIDE_DIR . '/application/configs';
-        $configFile = $configDir . '/config.ini';
-        $writer = new VF_Config_Writer($configFile);
+        $configFile = ConfigReader::getConfigPath('config.ini');
+        $writer = new \VuFind\Config\Writer($configFile);
         $writer->set('System', 'autoConfigure', 1);
-        if (@$writer->save()) {
+        if ($writer->save()) {
             $this->flashMessenger()->setNamespace('info')
                 ->addMessage('Auto-configuration enabled.');
 
@@ -257,8 +255,7 @@ class AdminController extends AbstractBase
                     . $configFile . '.'
                 );
         }
-        return $this->_forward('Config');
-         */
+        return $this->forwardTo('Admin', 'Config');
     }
 
     /**
-- 
GitLab