diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b42acf694e..945e63e309 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-04-12 Juan Manuel Ramon + + * extensions/users_connected.php + operation/incidents/incident.list.php + godmode/agentes/module_manager.php: Fixed some mistakes of my last + commit. + 2011-04-12 Miguel de Dios * include/functions_graph.php: added constants for some graphs. Added diff --git a/pandora_console/extensions/users_connected.php b/pandora_console/extensions/users_connected.php index e30da52f12..e5bd509ab4 100644 --- a/pandora_console/extensions/users_connected.php +++ b/pandora_console/extensions/users_connected.php @@ -35,10 +35,12 @@ function users_extension_main_god ($god = true) { $sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion WHERE descripcion = 'Logged in' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - 3600) GROUP BY id_usuario, ip_origen, accion"; + break; case "postgresql": $sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion WHERE descripcion = 'Logged in' AND utimestamp > (ceil(date_part('epoch', CURRENT_TIMESTAMP)) - 3600) GROUP BY id_usuario, ip_origen, accion"; + break; case "oracle": $sql = "SELECT id_usuario, ip_origen, fecha, accion FROM tsesion diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 156a22cae7..953f480aef 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -187,7 +187,7 @@ switch ($sortField) { switch ($config["dbtype"]) { case "mysql": case "postgresql": - $order[] = array('field' => 'dbms_lob.substr(tagente_modulo.nombre,4000,1)', 'order' => 'DESC'); + $order[] = array('field' => 'tagente_modulo.nombre', 'order' => 'DESC'); break; case "oracle": $order[] = array('field' => 'dbms_lob.substr(tagente_modulo.nombre,4000,1)', 'order' => 'DESC'); @@ -244,7 +244,7 @@ switch ($sortField) { switch ($config["dbtype"]) { case "mysql": case "postgresql": - $order[] = array('field' => 'dbms_lob.substr(nombre,4000,1)', 'order' => 'ASC'); + $order[] = array('field' => 'nombre', 'order' => 'ASC'); break; case "oracle": $order[] = array('field' => 'dbms_lob.substr(nombre,4000,1)', 'order' => 'ASC'); diff --git a/pandora_console/operation/incidents/incident.list.php b/pandora_console/operation/incidents/incident.list.php index 1890489738..0342c753d3 100644 --- a/pandora_console/operation/incidents/incident.list.php +++ b/pandora_console/operation/incidents/incident.list.php @@ -22,21 +22,27 @@ global $result_status; global $result_groups; global $result_resolutions; -foreach($result_status['status'] as $st) { - $status[$st['id']] = $st['name']; +if (!empty($result_status)) { + foreach($result_status['status'] as $st) { + $status[$st['id']] = $st['name']; + } } - // Add special status cases $status[0] = __('Any'); $status[-10] = __('Not closed'); - -foreach($result_groups['group'] as $gr) { - $groups[$gr['id']] = $gr['name']; +if (!empty($result_groups)) { + foreach($result_groups['group'] as $gr) { + $groups[$gr['id']] = $gr['name']; + } +} +else { + $groups = array(); } - $resolutions[0] = __('None'); -foreach($result_resolutions['resolution'] as $res) { - $resolutions[$res['id']] = $res['name']; +if (!empty($result_resolutions)) { + foreach($result_resolutions['resolution'] as $res) { + $resolutions[$res['id']] = $res['name']; + } } echo '
';