From e30b100e8edb9ee507a345568d87edecc7d230f4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 19 Oct 2018 15:00:30 -0400 Subject: [PATCH] Don't load & process categories in initial config loading --- web/includes/config.php.in | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/web/includes/config.php.in b/web/includes/config.php.in index a2a89b224..bf4b24e0b 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -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') ) {