2012-06-06 Vanessa Gil <vanessa.gil@artica.es>

* operation/agentes/exportdata.php: Fixed bug:
	If the data type of module is string, don't export the data in format: table, Excel or CSV.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6424 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-06-06 16:13:12 +00:00
parent 1a871c7603
commit be8d87e9e7
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-06-06 Vanessa Gil <vanessa.gil@artica.es>
* operation/agentes/exportdata.php: Fixed bug:
If the data type of module is string, don't export the data in format: table, Excel or CSV.
2012-06-06 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_modules.php: Fixed bug: When you

View File

@ -327,6 +327,7 @@ if (empty($export_btn)) {
//Module selector
$table->data[2][0] = '<b>'.__('Modules').'</b>';
$table->data[2][0] .= ui_print_help_tip(__("No modules of type string. You can not calculate their average"),true);
if ($agent > 0) {
$modules = agents_get_modules ($agent);
@ -334,6 +335,23 @@ if (empty($export_btn)) {
$modules = array ();
}
if(!empty($modules)) { //remove modules of type string because you cant calculate their average.
$i = 0;
foreach ($modules as $key=>$module) {
$id_module_type = modules_get_agentmodule_type ($key);
switch ($id_module_type) {
case 3:
case 10:
case 17:
case 23:
case 33:
unset($modules[$i]);
break;
}
$i++;
}
}
$disabled_export_button = false;
if (empty($modules)) {
$disabled_export_button = true;