Reworked AJax action HTTP code and HTTP content. Added new HTTP template to process HTTP code output

This commit is contained in:
Anton Terekhov
2012-11-11 20:42:48 +04:00
parent 618f12224e
commit e1c3da8019
4 changed files with 106 additions and 39 deletions

View File

@ -142,7 +142,11 @@ class FrontController
*/
$layout = new $layout_class();
$layout->setException($e);
return $layout->fetch(new ErrorAction($e));
$error_action = new ErrorAction($e);
if (isset($action) && is_subclass_of($action, 'AjaxAction')) {
$error_action->setAjax();
}
return $layout->fetch($error_action);
}
}
}