PHRAS-198 fix

This commit is contained in:
Nicolas Le Goff
2014-07-30 18:49:42 +02:00
parent 37d7206b88
commit 190ccd7e3e

View File

@@ -37,10 +37,13 @@ class TaskManager implements ControllerProviderInterface
})->bind('admin_tasks');
$controllers->get('/tasks/', function (Application $app, Request $request) {
if ($request->getContentType() == 'json') {
if ($request->getContentType() === 'json') {
if ($app['phraseanet.configuration']['main']['task-manager']['enabled']) {
return $app->json($app['task-manager']->toArray());
} else {
}
return $app->json(array());
}
$template = 'admin/tasks/list.html.twig';
@@ -48,7 +51,6 @@ class TaskManager implements ControllerProviderInterface
'task_manager' => $app['task-manager'],
'scheduler_key' => \phrasea::scheduler_key($app)
));
}
})->bind('admin_tasks_list');
$controllers->post('/tasks/create/', function (Application $app, Request $request) {