Fix 'complete' field value formatting with locales that don't use a dot as decimal point separator (#5258)
This commit is contained in:
parent
9d5dd5bf16
commit
b02359a6ce
1 changed files with 6 additions and 0 deletions
|
@ -558,6 +558,9 @@ class tasklist_database_driver extends tasklist_driver
|
|||
if (is_array($prop['recurrence'])) {
|
||||
$prop['recurrence'] = $this->serialize_recurrence($prop['recurrence']);
|
||||
}
|
||||
if (array_key_exists('complete', $prop)) {
|
||||
$prop['complete'] = number_format($prop['complete'], 2, '.', '');
|
||||
}
|
||||
|
||||
foreach (array('parent_id', 'date', 'time', 'startdate', 'starttime', 'alarms', 'recurrence', 'status') as $col) {
|
||||
if (empty($prop[$col]))
|
||||
|
@ -611,6 +614,9 @@ class tasklist_database_driver extends tasklist_driver
|
|||
if (is_array($prop['recurrence'])) {
|
||||
$prop['recurrence'] = $this->serialize_recurrence($prop['recurrence']);
|
||||
}
|
||||
if (array_key_exists('complete', $prop)) {
|
||||
$prop['complete'] = number_format($prop['complete'], 2, '.', '');
|
||||
}
|
||||
|
||||
$sql_set = array();
|
||||
foreach (array('title', 'description', 'flagged', 'complete') as $col) {
|
||||
|
|
Loading…
Add table
Reference in a new issue