diff --git a/web/api/app/Controller/ConfigsController.php b/web/api/app/Controller/ConfigsController.php index b0a87e080..2084a84b3 100644 --- a/web/api/app/Controller/ConfigsController.php +++ b/web/api/app/Controller/ConfigsController.php @@ -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(