$type = self::p('table-type',''); $type = $type ? explode(',',$type) : $type;
$name = self::p('table-name',''); $name = $name ? explode(',',$name) : $name;
- if ($rows = $this->conn->query($sql,PDO::FETCH_ASSOC)) foreach ($rows as $row) {
- $tname = current($row);
+ if ($rows = $this->conn->query($sql,PDO::FETCH_ASSOC)) {
+ foreach ($rows as $row) {
+ $tname = current($row);
- # Filters
- if (!empty($name) and !$this->str_match($row['name'],$name)) continue;
- if (!empty($type) and !$this->str_match($row['type'],$type)) continue;
+ # Filters
+ if (!empty($name) and !$this->str_match($row['name'],$name)) continue;
+ if (!empty($type) and !$this->str_match($row['type'],$type)) continue;
- # add to this->tables !!!
- $t = $this->table($tname,$row+['status'=>$row]);
+ # add to this->tables !!!
+ $t = $this->table($tname,$row+['status'=>$row]);
+ }
}
}
if ($this->bool()) return preg_match('/^(1|yes|on|true)/i',$value) ? 'Yes' : 'No';
- $value = Mime::html($value,$value,$mime);
+ # NB 06.09.24: field can be php code with already html
+ if ($this->type != 'html') $value = Mime::html($value,$value,$mime);
return $value;
}