From 61d66a854390e5a423a2cdecec554a300bc13c5e Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Tue, 4 Dec 2012 14:09:50 +0100 Subject: [PATCH] Fixed BUGID 369, defaultviewID was overwritten with hardcoded default --- src/include/functions_common.php | 4 +++- src/include/functions_config.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 7ee7bb8..5a58ab3 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -152,7 +152,7 @@ function GetFileLength($szFileName) function InitPhpLogCon() { // Needed to make global - global $gl_root_path, $content; + global $gl_root_path, $content, $CFG; // Abort if already defined if ( defined('PHPLOGCON_INITIALIZED') ) @@ -885,6 +885,8 @@ function InitConfigurationValues() // Load Configured Sources LoadSourcesFromDatabase(); + + } else { diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 2e4c90a..be4f7f5 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -546,8 +546,9 @@ function InitViewConfigs() 'groupid' => null, ); - // Set default of 'DefaultViewsID' - $CFG['DefaultViewsID'] = "SYSLOG"; + // Set default of 'DefaultViewsID' only if not set already! + if ( !isset($CFG['DefaultViewsID']) ) + $CFG['DefaultViewsID'] = "SYSLOG"; // Loop through views now and copy into content array! foreach ( $CFG['Views'] as $key => $view )