mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
2009-05-27 Esteban Sanchez <estebans@artica.es>
* include/functions_visual_map.php: Problem fixed on get_layout_status() with label elements. Fixed definitely #2787197. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1709 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f6760e920c
commit
f4d073dc3d
@ -1,3 +1,9 @@
|
|||||||
|
2009-05-27 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* include/functions_visual_map.php: Problem fixed on
|
||||||
|
get_layout_status() with label elements. Fixed definitely
|
||||||
|
#2787197.
|
||||||
|
|
||||||
2009-05-27 Esteban Sanchez <estebans@artica.es>
|
2009-05-27 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* include/functions_db.php: return_status_agent() renamed to
|
* include/functions_db.php: return_status_agent() renamed to
|
||||||
|
@ -291,6 +291,8 @@ function get_layout_status ($id_layout = 0) {
|
|||||||
$temp_status = 0;
|
$temp_status = 0;
|
||||||
$temp_total = 0;
|
$temp_total = 0;
|
||||||
|
|
||||||
|
$id_layout = (int) $id_layout;
|
||||||
|
|
||||||
$sql = sprintf ('SELECT id_agente_modulo, parent_item, id_layout_linked, id_agent
|
$sql = sprintf ('SELECT id_agente_modulo, parent_item, id_layout_linked, id_agent
|
||||||
FROM `tlayout_data` WHERE `id_layout` = %d', $id_layout);
|
FROM `tlayout_data` WHERE `id_layout` = %d', $id_layout);
|
||||||
$result = get_db_all_rows_filter ('tlayout_data', array ('id_layout' => $id_layout),
|
$result = get_db_all_rows_filter ('tlayout_data', array ('id_layout' => $id_layout),
|
||||||
@ -299,6 +301,8 @@ function get_layout_status ($id_layout = 0) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
foreach ($result as $rownum => $data) {
|
foreach ($result as $rownum => $data) {
|
||||||
|
if ($data["id_layout_linked"] == 0 && $data["id_agente_modulo"] == 0 && $data["id_agent"] == 0)
|
||||||
|
continue;
|
||||||
// Other Layout (Recursive!)
|
// Other Layout (Recursive!)
|
||||||
if (($data["id_layout_linked"] != 0) && ($data["id_agente_modulo"] == 0)) {
|
if (($data["id_layout_linked"] != 0) && ($data["id_agente_modulo"] == 0)) {
|
||||||
$status = get_layout_status ($data["id_layout_linked"]);
|
$status = get_layout_status ($data["id_layout_linked"]);
|
||||||
@ -309,9 +313,8 @@ function get_layout_status ($id_layout = 0) {
|
|||||||
} else {
|
} else {
|
||||||
$status = get_agent_status ($data["id_agent"]);
|
$status = get_agent_status ($data["id_agent"]);
|
||||||
}
|
}
|
||||||
|
if ($status == 1)
|
||||||
if ($status == 0)
|
return 1;
|
||||||
return 0;
|
|
||||||
if ($status > $temp_total)
|
if ($status > $temp_total)
|
||||||
$temp_total = $status;
|
$temp_total = $status;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user