2011-08-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_config.php: Fixed premature warning message about db
        maintenance over a new installation.

        Fixes: #3371197



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4706 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-08-10 15:01:14 +00:00
parent 4540e6edd3
commit bd2c31a018
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-08-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_config.php: Fixed premature warning message about db
maintenance over a new installation.
Fixes: #3371197
2011-08-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_menu.php, operation/menu.php, godmode/menu.php: fixed

View File

@ -714,10 +714,14 @@ function config_check (){
$db_maintance = db_get_sql ("SELECT `value` FROM tconfig WHERE `token` = 'db_maintance'");
$now = date("U");
// First action in order to know if it's a new installation or db maintenance never have been executed
$first_action = db_get_value_filter('utimestamp', 'tsesion', array('1' => '1', 'order' => 'id_sesion ASC'));
$fresh_installation = $now - $first_action;
$resta = $now - $db_maintance;
// ~ about 50 hr
if (($db_maintance == "") OR ($resta > 190000)){
if (($resta > 190000 AND $fresh_installation> 190000)){
$config["alert_cnt"]++;
$_SESSION["alert_msg"] .= '<h3 class="error">'.__("Database maintance problem").'</h3>';
$_SESSION["alert_msg"] .= __('Your database is not well maintained. Seems that it have more than 48hr without a proper maintance. Please review Pandora FMS documentation about how to execute this maintance process (pandora_db.pl) and enable it as soon as possible').'</h3>';