mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Apply ResponseMaker to backend AJAX and cms.page.display event
This commit is contained in:
parent
1df8e72e4a
commit
c5bd5f0e0a
@ -232,24 +232,24 @@ class Controller extends Extendable
|
||||
* Execute AJAX event
|
||||
*/
|
||||
if ($ajaxResponse = $this->execAjaxHandlers()) {
|
||||
return $ajaxResponse;
|
||||
$result = $ajaxResponse;
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute postback handler
|
||||
*/
|
||||
if (
|
||||
elseif (
|
||||
($handler = post('_handler')) &&
|
||||
($handlerResponse = $this->runAjaxHandler($handler)) &&
|
||||
$handlerResponse !== true
|
||||
) {
|
||||
return $handlerResponse;
|
||||
$result = $handlerResponse;
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute page action
|
||||
*/
|
||||
$result = $this->execPageAction($action, $params);
|
||||
else {
|
||||
$result = $this->execPageAction($action, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare and return response
|
||||
|
@ -263,7 +263,7 @@ class Controller
|
||||
*
|
||||
*/
|
||||
if ($event = $this->fireSystemEvent('cms.page.display', [$url, $page, $result])) {
|
||||
return $event;
|
||||
$result = $event;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user