X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/14b5545c55923291604a2062f0e742b9632b00e9..7daf31ceedd9e6b0aba992d962fc8c66a1c5d8fd:/lib/MECON/HTML/Arbol/ArbolDB.php diff --git a/lib/MECON/HTML/Arbol/ArbolDB.php b/lib/MECON/HTML/Arbol/ArbolDB.php index c3bafe4..78dfd5f 100644 --- a/lib/MECON/HTML/Arbol/ArbolDB.php +++ b/lib/MECON/HTML/Arbol/ArbolDB.php @@ -34,6 +34,7 @@ class HTML_ArbolDB extends HTML_Arbol var $tabla; var $nombre; var $id; + var $id_activo; var $link = ''; var $link_append = ''; var $where = ''; @@ -47,6 +48,7 @@ class HTML_ArbolDB extends HTML_Arbol $this->tabla = $dbdata['tabla']; $this->nombre = $dbdata['nombre']; $this->id = $dbdata['id']; + $this->id_activo = @$dbdata['id_activo']; // FIXME - Deprecated! if(isset($dbdata['prepend_link'])) $link_append = $dbdata['prepend_link']; @@ -87,12 +89,16 @@ class HTML_ArbolDB extends HTML_Arbol if(!$this->padre) $sub = array(); else $sub = $this->BuscarHijos($id); $link = strval(@$row[2]); - $dat[] = array( + $d = array( 'titulo'=> $titulo, 'link' => $link, 'id' => $id, 'sub' => $sub ); + if (!is_null($this->id_activo) and $id == $this->id_activo) { + $d['activo'] = 1; + } + $dat[] = $d; } return $dat;