$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))
$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))