mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed the MySQL error in the policies tree. Ticket #1340
This commit is contained in:
parent
146e693285
commit
490abfecf7
@ -889,7 +889,7 @@ function treeview_getData ($type) {
|
|||||||
array_push($list, array('id' => 0, 'name' => 'No policy'));
|
array_push($list, array('id' => 0, 'name' => 'No policy'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$list = db_get_all_rows_sql("SELECT DISTINCT tpolicies.id,
|
$sql = "SELECT DISTINCT tpolicies.id,
|
||||||
tpolicies.name
|
tpolicies.name
|
||||||
FROM tpolicies, tpolicy_modules, tagente_estado,
|
FROM tpolicies, tpolicy_modules, tagente_estado,
|
||||||
tagente, tagente_modulo
|
tagente, tagente_modulo
|
||||||
@ -904,7 +904,12 @@ function treeview_getData ($type) {
|
|||||||
tagente.id_grupo IN ($groups) AND
|
tagente.id_grupo IN ($groups) AND
|
||||||
tagente.disabled = 0 AND
|
tagente.disabled = 0 AND
|
||||||
tagente_modulo.disabled = 0
|
tagente_modulo.disabled = 0
|
||||||
ORDER BY tpolicies.name ' . $order_collate . ' ASC");
|
ORDER BY tpolicies.name " . $order_collate . " ASC";
|
||||||
|
|
||||||
|
$list = db_get_all_rows_sql($sql);
|
||||||
|
if ($list === false)
|
||||||
|
$list = array();
|
||||||
|
|
||||||
|
|
||||||
$element = 0;
|
$element = 0;
|
||||||
switch ($select_status) {
|
switch ($select_status) {
|
||||||
|
@ -26,14 +26,15 @@ require_once ($config['homedir'] . '/include/functions_treeview.php');
|
|||||||
|
|
||||||
if (defined ('METACONSOLE')) {
|
if (defined ('METACONSOLE')) {
|
||||||
// For each server defined:
|
// For each server defined:
|
||||||
$servers = db_get_all_rows_sql ("SELECT * FROM tmetaconsole_setup WHERE disabled = 0");
|
$servers = db_get_all_rows_sql ("SELECT *
|
||||||
|
FROM tmetaconsole_setup
|
||||||
|
WHERE disabled = 0");
|
||||||
if ($servers === false) {
|
if ($servers === false) {
|
||||||
$servers = array();
|
$servers = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ajax ())
|
if (is_ajax ()) {
|
||||||
{
|
|
||||||
require_once ($config['homedir'] . '/include/functions_reporting.php');
|
require_once ($config['homedir'] . '/include/functions_reporting.php');
|
||||||
require_once ($config['homedir'] . '/include/functions_users.php');
|
require_once ($config['homedir'] . '/include/functions_users.php');
|
||||||
require_once ($config['homedir'] . '/include/functions_servers.php');
|
require_once ($config['homedir'] . '/include/functions_servers.php');
|
||||||
@ -453,7 +454,7 @@ if (is_ajax ())
|
|||||||
echo " ";
|
echo " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<a style='vertical-align: middle;' onfocus='JavaScript: this.blur()' href='javascript: loadModuleTable(" . $row["id_agente_modulo"] . ", \"" . $server_name . "\"". "," . $id.")'>";
|
echo "<a style='vertical-align: middle;' onfocus='JavaScript: this.blur()' href='javascript: loadModuleTable(" . $row["id_agente_modulo"] . ", \"" . $server_name . "\"". "," . $id.")'>";
|
||||||
echo ui_print_truncate_text(io_safe_output($row['nombre']), 40, true);
|
echo ui_print_truncate_text(io_safe_output($row['nombre']), 40, true);
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
if ($row['quiet']) {
|
if ($row['quiet']) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user