2011-07-06 Sergio Martin <sergio.martin@artica.es>

* include/functions_servers.php: Fixed divison by zero



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4513 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-07-06 08:05:05 +00:00
parent 4e5d553ebd
commit 183e4cb627
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-07-06 Sergio Martin <sergio.martin@artica.es>
* include/functions_servers.php: Fixed divison by zero
2011-07-05 Miguel de Dios <miguel.dedios@artica.es>
* ChangeLog: fixed date of my last commit.

View File

@ -84,7 +84,7 @@ function servers_get_performance () {
WHERE tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
AND disabled = 0 AND id_modulo != 1 AND module_interval > 0 AND utimestamp > 0");
if ($data["total_remote_modules"] == 0)
if ($data["avg_interval_remote_modules"] == 0)
$data["remote_modules_rate"] = 0;
else
$data["remote_modules_rate"] = $data["total_remote_modules"] / $data["avg_interval_remote_modules"];