Remove zm_configvals. Just use zm_config. Move code into loadConfig.

This commit is contained in:
Isaac Connor committed 2025-12-22 13:17:01 -05:00
1 parent 43f2525fdf
commit 68f91acf10
2 files changed
+70 -62

No files matched your search

+6 -3
View File
@@ -77,14 +77,17 @@ class ConfigsController extends AppController {
public function viewByName($name = null) {
$config = $this->Config->findByName($name, array('fields' => 'Value'));
if ( !$config ) {
global $zm_config;
if (!$config) {
global $zm_config;
if ( $zm_config[$name] ) {
if ( isset($zm_config[$name]) ) {
$config = array('Config'=>$zm_config[$name]);
} else {
ZM\Error(print_r($zm_config, true));
throw new NotFoundException(__('Invalid config'));
}
} else {
} else if ( isset($zm_config[$name]) ) {
$config['Config']['Value'] = $zm_config[$name]['Value'];
}
$this->set(array(