Permalink
Browse files

Fix server-add for German and other locales that use comma as decimal…

… separator.
  • Loading branch information...
1 parent 6ce0132 commit f7b39e7db71058c89ada225aac43d9c7b24377da @andyst andyst committed Feb 22, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 modules/server_add/controllers/server_add.php
@@ -109,9 +109,11 @@ function run($task_id) {
}
$task = task::run($task_id);
+ // Prevent the JavaScript code from breaking by forcing a period as
+ // decimal separator for all locales with sprintf("%F", $value).
print json_encode(array("done" => (bool)$task->done,
"status" => $task->status,
- "percent_complete" => $task->percent_complete));
+ "percent_complete" => sprintf("%F", $task->percent_complete)));
}
/**

0 comments on commit f7b39e7

Please sign in to comment.