mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
remove spaces in checkbox, radio, select types inputbox
remove spaces in checkbox, radio, select types inputbox. and code optimizing
This commit is contained in:
parent
78316f7da5
commit
fc9330bb18
1 changed files with 3 additions and 9 deletions
|
|
@ -249,7 +249,7 @@ class ExtraItem
|
||||||
|
|
||||||
for($i = 0, $c = count($values); $i < $c; $i++)
|
for($i = 0, $c = count($values); $i < $c; $i++)
|
||||||
{
|
{
|
||||||
$values[$i] = htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
|
|
@ -302,21 +302,15 @@ class ExtraItem
|
||||||
case 'textarea' :
|
case 'textarea' :
|
||||||
return nl2br($value);
|
return nl2br($value);
|
||||||
|
|
||||||
case 'checkbox' :
|
|
||||||
if(is_array($value))
|
|
||||||
{
|
|
||||||
return implode(', ', $value);
|
|
||||||
}
|
|
||||||
return $value;
|
|
||||||
|
|
||||||
case 'date' :
|
case 'date' :
|
||||||
return zdate($value, "Y-m-d");
|
return zdate($value, "Y-m-d");
|
||||||
|
|
||||||
|
case 'checkbox' :
|
||||||
case 'select' :
|
case 'select' :
|
||||||
case 'radio' :
|
case 'radio' :
|
||||||
if(is_array($value))
|
if(is_array($value))
|
||||||
{
|
{
|
||||||
return implode(', ', $value);
|
return implode(',', $value);
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue