display error on ajax module activation

This commit is contained in:
Manuel Raynaud
2013-10-18 09:17:08 +02:00
parent 3a4fb6f2d2
commit 12b5a81364
3 changed files with 44 additions and 5 deletions

View File

@@ -70,9 +70,13 @@ class ModuleController extends BaseAdminController
if($this->getRequest()->isXmlHttpRequest()) {
if($message) {
$response = $this->nullResponse($message, 500);
$response = $this->jsonResponse(json_encode(array(
"error" => $message
)), 500);
} else {
$response = $this->nullResponse();
}
$response = $this->nullResponse();
} else {
$this->redirectToRoute('admin.module');
}