if not rows then rows = {} end
local count = 0 for _,row in pairs(rows) do count = count+1 end
- local langs = {}
- local count = 0 for _,row in pairs(rows) do
+ --local langs = {} langs["eng"] = 1
+ local count = 0
+ for _,row in pairs(rows) do
count = count + 1
- local lang = rows.lang
- --langs[lang] = rows.lang
+ --langs[rows.lang] = 1
end
return {
$opt['use_out'] = false;
if ($this->p('out') or !preg_match('/^('.join('|',
- [ '','template','table','sql','_div','wp' ] # local
+ [ '','template','table','_div','sql','wp' ] # local
).')$/',$format))
{
foreach ($fields as $f => $field) {
if (!$this->field($f)) continue;
+ #
+ # Mime content
+ $row[$f] = $field->htmlValue($row[$f]);
+
$row[$f] = $field->out(isset($row[$f]) ? $row[$f] : '');
+
$count_fields++;
}
if ($this->buttons() and !empty($buttons[0])) $html .= '<td class="action">'.$buttons[0].'</td>'.NB_EOL;
foreach ($row as $k => $v) {
- if ( !empty($this->field($k)) ) {
- $v = $this->field($k)->htmlValue($v);
- }
$html .= '<td'.$this->_rows_table_class($this->field($k)).'>'.$v.'</td>'.NB_EOL;
}
}
- public static function html_img_data($str) {
+ private static function html_img_jpeg($str) {
$v = self::is_base64($str) ? $v : base64_encode($str);
return '<img src="data:image/jpeg;base64,'.$v.'" />';
}
},$str) and $str != $v) return $v;
} elseif (preg_match('@^image/@',$mime)) {
- return self::html_img_data($str);
+ return self::html_img_jpeg($str);
}
#return $str .= '|'.$mime;