]> git.llucax.com Git - mecon/meconlib.git/blobdiff - lib/MECON/HTML/ArbolDB.php
- Correccion de bugs
[mecon/meconlib.git] / lib / MECON / HTML / ArbolDB.php
index 31e75770c7f4637da426649c4cc43e745896d512..dedf3b93b37d21b6e2c5f3dd2c4f5e34999b5b4f 100644 (file)
@@ -141,11 +141,13 @@ class MECON_HTML_ArbolDB extends MECON_HTML_Arbol
             $this->link = $dbdata['link']; 
         if(isset($dbdata['where']))
             $this->where = $dbdata['where'];
             $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(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))
         {
           $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;
             $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))
         $sql .= $this->order;
         $result = $this->db->query($sql);
         if(DB::isError($result))