X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/3df26b6027dd37d5048e27fc8e27192ab2c9d4e9..17eeb40fc086f03e96fcaf6bfe6581beb17be123:/lib/MECON/HTML/ArbolDB.php?ds=inline diff --git a/lib/MECON/HTML/ArbolDB.php b/lib/MECON/HTML/ArbolDB.php index 311bed4..dedf3b9 100644 --- a/lib/MECON/HTML/ArbolDB.php +++ b/lib/MECON/HTML/ArbolDB.php @@ -126,7 +126,7 @@ class MECON_HTML_ArbolDB extends MECON_HTML_Arbol * @return void * @access public */ - function MECON_HTML_ArbolDB($dbdata, $titulo, $link_append = '', $expandir = true) + function MECON_HTML_ArbolDB($dbdata, $titulo, $link_append = '', $expandir = false) { if(isset($dbdata['id_padre'])) $this->padre = $dbdata['id_padre']; @@ -141,6 +141,8 @@ 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']; @@ -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))