mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +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++)
|
||||
{
|
||||
$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;
|
||||
|
|
@ -302,21 +302,15 @@ class ExtraItem
|
|||
case 'textarea' :
|
||||
return nl2br($value);
|
||||
|
||||
case 'checkbox' :
|
||||
if(is_array($value))
|
||||
{
|
||||
return implode(', ', $value);
|
||||
}
|
||||
return $value;
|
||||
|
||||
case 'date' :
|
||||
return zdate($value, "Y-m-d");
|
||||
|
||||
case 'checkbox' :
|
||||
case 'select' :
|
||||
case 'radio' :
|
||||
if(is_array($value))
|
||||
{
|
||||
return implode(', ', $value);
|
||||
return implode(',', $value);
|
||||
}
|
||||
return $value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue