cast $task->done to bool so that it doesn't show up as "0" to the JS,

which will interpret that as a true value, when it's not.
This commit is contained in:
Bharat Mediratta
2010-01-28 20:38:48 -08:00
parent df3db40ab7
commit 56d04b1ed8

View File

@@ -110,7 +110,7 @@ class Server_Add_Controller extends Admin_Controller {
}
$task = task::run($task_id);
print json_encode(array("done" => $task->done,
print json_encode(array("done" => (bool)$task->done,
"status" => $task->status,
"percent_complete" => $task->percent_complete));
}