if ($value!==null) return header("$format: $value");
- if (!$mime=mime::get($format)) return false;
+ if (!$mime=Mime::get($format)) return false;
header('Content-type: '.$mime);
return $mime;
public static function content_type2format($content_type=null) {
if (empty($content_type)) $content_type = self::client_content_type();
- switch (mime::ext($content_type)) {
+ switch (Mime::ext($content_type)) {
case "html":
return 'table';
default:
if ($this->buttons() and !empty($buttons[0])) $html .= '<td class="action">'.$buttons[0].'</td>'.NB_EOL;
foreach ($row as $k => $v) {
- $mime = '';
if ( !empty($this->field($k)) ) {
- $v = $this->field($k)->htmlValue($v,$mime);
+ $v = $this->field($k)->htmlValue($v);
}
$html .= '<td'.$this->_rows_table_class($this->field($k)).'>'.$v.'</td>'.NB_EOL;
}
public static function out($v) { echo $v; }
public static function title2filename($title,$content_type='') {
- $ext = $content_type ? mime::ext($content_type) : '';
+ $ext = $content_type ? Mime::ext($content_type) : '';
$title = self::no_accent($title);
$title = preg_replace('/\W+/','_',$title);
if ($ext) $title .= '.'.$ext;
$content_type = self::p('content_type');
if (!$format and $content_type) {
- self::p('format',mime::ext($content_type));
+ self::p('format',Mime::ext($content_type));
} elseif (!$format and ($client_type = self::client_content_type())) {
- self::p('format',mime::ext($client_type));
+ self::p('format',Mime::ext($client_type));
}
- if (!$content_type and $format) $content_type = mime::get($format);
+ if (!$content_type and $format) $content_type = Mime::get($format);
if (!$content_type and !$format and self::php_cli()) $content_type = 'text/plain';
if (!$content_type) $content_type = self::content_type();
#debug([$content_type,self::content_type()]);
$row_parse_post = $this->db()->row_parse_post;
return;
}
- # nb 31.01.18: move to out.php or ldap.php
- if ($this->is_html) Mime::html($r);
if (empty($row_parse_post)) return;
$row_parse_post($r,$this->table);