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');
|
||||||
|
|
Loading…
Reference in New Issue