Check style
(http://www.dolibarr.fr/forum/3-installation/40712-sauvegarde)
This commit is contained in:
parent
e0baa0fe46
commit
9572eebae0
@ -72,6 +72,7 @@ function dol_json_encode($elements)
|
|||||||
$output = '{';
|
$output = '{';
|
||||||
$last = $num - 1;
|
$last = $num - 1;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
if (is_array($elements) && count($elements)>0) {
|
||||||
foreach($elements as $key => $value)
|
foreach($elements as $key => $value)
|
||||||
{
|
{
|
||||||
$output .= '"'.$key.'":';
|
$output .= '"'.$key.'":';
|
||||||
@ -80,6 +81,7 @@ function dol_json_encode($elements)
|
|||||||
if ($i !== $last) $output.= ',';
|
if ($i !== $last) $output.= ',';
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$output.= '}';
|
$output.= '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user