Include values in /etc/zm files in viewByName

This commit is contained in:
Isaac Connor 2018-06-25 15:43:01 -04:00
parent 4f0c56d731
commit e04eac57ae
1 changed files with 8 additions and 2 deletions

View File

@ -56,8 +56,14 @@ class ConfigsController extends AppController {
public function viewByName($name = null) {
$config = $this->Config->findByName($name, array('fields' => 'Value'));
if (!$config) {
throw new NotFoundException(__('Invalid config'));
if ( !$config ) {
global $configvals;
if ( $configvals[$name] ) {
$config = array( 'Config'=>array('Value'=>$configvals[$name]) );
} else {
throw new NotFoundException(__('Invalid config'));
}
} else {
}
$this->set(array(