From 2a5f05499edde1df546fb31e134d43b3ca2db78f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 10 May 2018 13:44:46 -0400 Subject: [PATCH] Munge the config in the global configvals into the configs array before returning it. --- web/api/app/Controller/ConfigsController.php | 21 +++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/web/api/app/Controller/ConfigsController.php b/web/api/app/Controller/ConfigsController.php index 48f50ae8e..b0a87e080 100644 --- a/web/api/app/Controller/ConfigsController.php +++ b/web/api/app/Controller/ConfigsController.php @@ -21,15 +21,18 @@ class ConfigsController extends AppController { * * @return void */ - public function index() { - $this->Config->recursive = 0; - $configs = $this->Config->find('all'); - $this->set(array( - 'configs' => $configs, - '_serialize' => array('configs') - )); - } - + public function index() { + global $configvals; + $this->Config->recursive = 0; + $configs = $this->Config->find('all'); + foreach ( $configvals as $k=>$v ) { + $configs[] = array( 'Config'=>array('Name'=>$k, 'Value'=>$v ) ); + } + $this->set(array( + 'configs' => $configs, + '_serialize' => array('configs') + )); + } /** * view method