X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/9fbf32b42919b036c64c2dcae2e773aa0bef72b7..cbce50ea7cf886c2c3cde328ab2dcd6e950e62d9:/lib/MECON/HTML/ArbolDB.php?ds=inline diff --git a/lib/MECON/HTML/ArbolDB.php b/lib/MECON/HTML/ArbolDB.php index 31e7577..dedf3b9 100644 --- a/lib/MECON/HTML/ArbolDB.php +++ b/lib/MECON/HTML/ArbolDB.php @@ -141,11 +141,13 @@ class MECON_HTML_ArbolDB extends MECON_HTML_Arbol $this->link = $dbdata['link']; if(isset($dbdata['where'])) $this->where = $dbdata['where']; + if(isset($dbdata['habilitado'])) + $this->habilitado = $dbdata['habilitado']; if(isset($dbdata['order'])) $this->order = ' ORDER BY '.$dbdata['nombre'].' '.$dbdata['order']; $this->db = $dbdata['db']; - if($expandir) + if(!$expandir) { $this->expandir = array($this->id_activo); if(isset($this->id_activo)) @@ -188,6 +190,8 @@ class MECON_HTML_ArbolDB extends MECON_HTML_Arbol $sql .= ' AND'; } elseif ($this->where) $sql .= $this->where; + if(isset($this->habilitado)) + $sql .= " AND ".$this->habilitado." = 1 "; $sql .= $this->order; $result = $this->db->query($sql); if(DB::isError($result))