fixing the fix ..., good that new etemplate2 always uses csv_explode

This commit is contained in:
Ralf Becker 2012-03-17 14:18:30 +00:00
parent ffccc00439
commit 809b5f3dac

View File

@ -1274,7 +1274,7 @@ class etemplate extends boetemplate
case 'text': // size: [length][,maxLength[,preg[,html5type]]] case 'text': // size: [length][,maxLength[,preg[,html5type]]]
$cell_opts = $c = self::csv_split($cell_options); // allows to enclose preg in quote to allow comma $cell_opts = $c = self::csv_split($cell_options); // allows to enclose preg in quote to allow comma
// fix preg, in case it contains a comma (html5type is only letters and always last option!) // fix preg, in case it contains a comma (html5type is only letters and always last option!)
if (count($cell_opts) > 3) if (count($cell_opts) > 3 && ($cell_opts2 = explode(',',$cell_options)) && $cell_opts2[2][0] != '"')
{ {
$html5type = array_pop($cell_opts); $html5type = array_pop($cell_opts);
$cell_opts = explode(',',$cell_options,3); $cell_opts = explode(',',$cell_options,3);