Don't load & process categories in initial config loading

This commit is contained in:
Isaac Connor committed 2018-10-19 15:00:30 -04:00
1 parent f9b1453705
commit e30b100e8e
1 file changed
+2 -12
+2 -12
View File
@@ -158,29 +158,19 @@ $GLOBALS['defaultUser'] = array(
function loadConfig( $defineConsts=true ) {
global $config;
global $configCats;
global $dbConn;
$config = array();
$configCat = array();
$result = $dbConn->query( 'select * from Config order by Id asc' );
$result = $dbConn->query('SELECT Name,Value FROM Config');
if ( !$result )
echo mysql_error();
$monitors = array();
while( $row = dbFetchNext( $result ) ) {
if ( $defineConsts )
define( $row['Name'], $row['Value'] );
$config[$row['Name']] = $row;
if ( !($configCat = &$configCats[$row['Category']]) ) {
$configCats[$row['Category']] = array();
$configCat = &$configCats[$row['Category']];
}
$configCat[$row['Name']] = $row;
}
//print_r( $config );
//print_r( $configCats );
}
} # end function loadConfig
// For Human-readability, use ZM_SERVER_HOST or ZM_SERVER_NAME in zm.conf, and convert it here to a ZM_SERVER_ID
if ( ! defined('ZM_SERVER_ID') ) {