Skip to content

Commit a9e0d9d

Browse files
committed
Fix download list (#5)
Surround all json value with " because float number sometimes use ',' instead of '.'
1 parent f1c7468 commit a9e0d9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

downloads-ajax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ function my_cmp($a, $b)
177177

178178
$percentual_progress = ((float)$file->size_done * 100) / ((float)$file->size);
179179

180-
echo ', "status_complted_class": "' . StatusCompltedClass($file) . '", "percentual_progress": ' . $percentual_progress;
180+
echo ', "status_complted_class": "' . StatusCompltedClass($file) . '", "percentual_progress": "' . $percentual_progress;
181181

182-
echo ', "size_done": "' . CastToXBytes($file->size_done) . '", "size": "' . CastToXBytes($file->size) . '"';
182+
echo '", "size_done": "' . CastToXBytes($file->size_done) . '", "size": "' . CastToXBytes($file->size) . '"';
183183

184184
if($i == $countDownloads - 1) { echo '}'; } else { echo '}, '; }
185185
}

0 commit comments

Comments
 (0)