Munge the config in the global configvals into the configs array before returning it.

pull/2101/head
Isaac Connor 2018-05-10 13:44:46 -04:00
parent a86b81d12e
commit 2a5f05499e
1 changed files with 12 additions and 9 deletions

View File

@ -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