2011-03-16 Sancho Lerena <slerena@artica.es>

* operation/agentes/estado_monitores.php: Fixed an ugly error when cannot
        get the policy name. Show unknown in that case, avoiding the SQL error.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4098 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2011-03-16 15:26:57 +00:00
parent cf2d63ac56
commit 80ab60dac1
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-03-16 Sancho Lerena <slerena@artica.es>
* operation/agentes/estado_monitores.php: Fixed an ugly error when cannot
get the policy name. Show unknown in that case, avoiding the SQL error.
2011-03-14 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.preview.php: fixed a typing error.

View File

@ -205,7 +205,12 @@ foreach ($modules as $module) {
if ($module["id_policy_module"] != 0) {
$linked = isModuleLinked($module['id_agente_modulo']);
$id_policy = get_db_value_sql('SELECT id_policy FROM tpolicy_modules WHERE id = '.$module["id_policy_module"]);
$name_policy = get_db_value_sql('SELECT name FROM tpolicies WHERE id = '.$id_policy);
if ($id_policy != "")
$name_policy = get_db_value_sql('SELECT name FROM tpolicies WHERE id = '.$id_policy);
else
$name_policy = __("Unknown");
$policyInfo = infoModulePolicy($module["id_policy_module"]);
$adopt = false;