mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Changed install.php handling, so it is not necessary to remove the script anymore.
To avoid problems with automatic package updating, we changed the installer handling. From now, the install.php will be allowed to run only in two cases, first if the config.php file is missing, and second if the config.php file is empty. Also removed the install file remove warning.
This commit is contained in:
parent
7ef1da61eb
commit
6ee90d7e00
@ -43,6 +43,7 @@ if ( !defined('IN_PHPLOGCON') )
|
||||
include($gl_root_path . 'include/constants_general.php');
|
||||
include($gl_root_path . 'include/constants_logstream.php');
|
||||
|
||||
/*
|
||||
if ( is_file($gl_root_path . 'config.php') )
|
||||
include($gl_root_path . 'config.php');
|
||||
else
|
||||
@ -51,6 +52,7 @@ else
|
||||
if ( !defined('IN_PHPLOGCON_INSTALL') )
|
||||
CheckForInstallPhp();
|
||||
}
|
||||
*/
|
||||
|
||||
include($gl_root_path . 'classes/class_template.php');
|
||||
include($gl_root_path . 'include/functions_themes.php');
|
||||
@ -104,7 +106,7 @@ function InitBasicPhpLogCon()
|
||||
StartPHPSession();
|
||||
}
|
||||
|
||||
function InitPhpLogConConfigFile()
|
||||
function InitPhpLogConConfigFile($bHandleMissing = true)
|
||||
{
|
||||
// Needed to make global
|
||||
global $CFG, $gl_root_path, $content;
|
||||
@ -131,11 +133,20 @@ function InitPhpLogConConfigFile()
|
||||
$content['ShowPageRenderStats'] = "true";
|
||||
InitPageRenderStats();
|
||||
}
|
||||
|
||||
// return result
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check for installscript!
|
||||
CheckForInstallPhp();
|
||||
// if handled ourselfe, we die in CheckForInstallPhp.
|
||||
if ( $bHandleMissing == true )
|
||||
{
|
||||
// Check for installscript!
|
||||
CheckForInstallPhp();
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ function InitFrontEndDefaults()
|
||||
// --- END Main Info Area
|
||||
|
||||
// Check if install file still exists
|
||||
InstallFileReminder();
|
||||
// NOT NEEDED ANYMORE InstallFileReminder();
|
||||
}
|
||||
|
||||
function InstallFileReminder()
|
||||
|
@ -45,6 +45,8 @@ include($gl_root_path . 'include/functions_frontendhelpers.php');
|
||||
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/main.php' );
|
||||
|
||||
InitBasicPhpLogCon();
|
||||
if ( InitPhpLogConConfigFile(false) )
|
||||
DieWithErrorMsg( 'phpLogCon is already configured!<br><br> If you want to reconfigure phpLogCon, either delete the current <B>config.php</B> or replace it with an empty file.<br><br>Click <A HREF="index.php">here</A> to return to pgpLogCon start page.');
|
||||
//InitPhpLogCon();
|
||||
|
||||
// Set some static values
|
||||
|
Loading…
x
Reference in New Issue
Block a user