2012-12-03 Ramon Novoa <rnovoa@artica.es>
* include/functions_treeview.php: Fixed id decoding under the metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7223 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
dc6206ff83
commit
25799f0bbb
|
@ -1,3 +1,8 @@
|
||||||
|
2012-12-03 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* include/functions_treeview.php: Fixed id decoding under the
|
||||||
|
metaconsole.
|
||||||
|
|
||||||
2012-12-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-12-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql
|
* pandoradb_data.sql
|
||||||
|
|
|
@ -263,7 +263,7 @@ function treeview_printTree($type) {
|
||||||
// Convert the id to hexadecimal, since it will be used as a div id
|
// Convert the id to hexadecimal, since it will be used as a div id
|
||||||
if (defined ('METACONSOLE')) {
|
if (defined ('METACONSOLE')) {
|
||||||
$id = unpack ('H*', $item['_id_']);
|
$id = unpack ('H*', $item['_id_']);
|
||||||
$id = $hex_id[1];
|
$id = $id[1];
|
||||||
} else {
|
} else {
|
||||||
$id = $item['_id_'];
|
$id = $item['_id_'];
|
||||||
}
|
}
|
||||||
|
@ -773,6 +773,13 @@ function treeview_getFirstBranchSQL ($type, $id, $avariableGroupsIds, $statusSel
|
||||||
//Extract all rows of data for each type
|
//Extract all rows of data for each type
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'group':
|
case 'group':
|
||||||
|
if (defined ('METACONSOLE')) {
|
||||||
|
$id = groups_get_id (pack ('H*', $id));
|
||||||
|
if ($id == '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'id_grupo' => $id,
|
'id_grupo' => $id,
|
||||||
|
@ -783,14 +790,6 @@ function treeview_getFirstBranchSQL ($type, $id, $avariableGroupsIds, $statusSel
|
||||||
'AR',
|
'AR',
|
||||||
false,
|
false,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
if (defined ('METACONSOLE')) {
|
|
||||||
$id = groups_get_id (pack ('H*', $id));
|
|
||||||
if ($id == '') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'os':
|
case 'os':
|
||||||
|
|
||||||
|
@ -888,17 +887,16 @@ function treeview_getFirstBranchSQL ($type, $id, $avariableGroupsIds, $statusSel
|
||||||
', $name);
|
', $name);
|
||||||
break;
|
break;
|
||||||
case 'tag':
|
case 'tag':
|
||||||
|
$id = tags_get_id (pack ('H*', $id));
|
||||||
|
if ($id === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$sql = "SELECT tagente.*
|
$sql = "SELECT tagente.*
|
||||||
FROM tagente, tagente_modulo, ttag_module
|
FROM tagente, tagente_modulo, ttag_module
|
||||||
WHERE tagente.id_agente = tagente_modulo.id_agente
|
WHERE tagente.id_agente = tagente_modulo.id_agente
|
||||||
AND tagente_modulo.id_agente_modulo = ttag_module.id_agente_modulo
|
AND tagente_modulo.id_agente_modulo = ttag_module.id_agente_modulo
|
||||||
AND ttag_module.id_tag = " . $id;
|
AND ttag_module.id_tag = " . $id;
|
||||||
|
|
||||||
$id = tags_get_id (pack ('H*', $id));
|
|
||||||
if ($id === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue